Nach this howto Ich Cross-Compiling eine Bluetooth-Anwendung für Raspberry Pi (ARM). Wenn ich versuche, mit libbluetooth zu verbinden, erhalte ich den Fehler unten. Selbst die einfachste Helloworld-Anwendung (ohne Bluetooth-Code) wird nicht verlinkt.Cross-compile für ARM: undefinierter Verweis auf '[email protected]_2.15'
arm-linux-gnueabihf-g++ -c hello.cpp -o hello.o
arm-linux-gnueabihf-g++ hello.o -o hello -lbluetooth -L/home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf
/home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so: undefined reference to `[email protected]_2.15'
[email protected] ~/raspberrypi/projects/test $ ls -al /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth*
-rw-r--r-- 1 sbf sbf 132886 May 27 2016 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.a
lrwxrwxrwx 1 sbf sbf 23 Nov 24 21:20 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so -> libbluetooth.so.3.17.11
lrwxrwxrwx 1 sbf sbf 23 Nov 24 21:20 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3 -> libbluetooth.so.3.17.11
-rw-r--r-- 1 sbf sbf 103376 May 27 2016 /home/sbf/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.17.11
Edit (hinzugefügt): GLIBC Version 2,19
[email protected]:~ $ ldd --version
ldd (Debian GLIBC 2.19-18+deb8u6) 2.19
Was falsch los ist?
Was ist die Version von glibc? – Starl1ght
@ Starl1ght GLIBC 2.19 (auf RPi von wo ich kopiert '/ usr/*' und '/ lib/*') – SBF
Aber welche Version von glibc ist die Cross-Toolchain verwenden (seit -L wird nicht überschrieben werden, seine eingebauten Sysroot) Ich wette, da liegt das Problem. – Notlikethat