Cross compiling: cannot find -lx11 - Raspberry Pi Forums


hi,

i'm new cross compiling (and raspberry pi). have managed basic applications compiling using raspberry pi tools (https://github.com/raspberrypi/tools). compiling , working fine. i'm starting use cimg library uses x11. i'm compiling natively in linux on pc using:

code: select all

g++ -o native-cimg-test "cimg_test.cpp" -o2 -l/usr/x11r6/lib -lm -lpthread -lx11
works great. when try compile pi using arm-bcm2708-linux-gnueabi-g++ same flags, error:

code: select all

/home/will/pi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/../lib/gcc/arm-bcm2708-linux-gnueabi/4.7.1/../../../../arm-bcm2708-linux-gnueabi/bin/ld: cannot find -lx11 collect2: error: ld returned 1 exit status make: *** [cimg-pi] error 1
don't know flags trying find problem proving difficult. assume need libx11.a/so raspberry pi? pointers great

hey,
solved problem using pi self.
run

code: select all

sudo apt-get install libx11-dev 
on pi , copy /usr/lib/* toolchains library path (usually ./sysroot/lib/) , /usr/include/* include directory of toolchain.

hope helps you

cheers


raspberrypi



Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums