android mm 빌드시 error: undefined reference to '__xstat' 나오는데요
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libusb-1.0_intermediates/libusb-1.0.a(libusb_1_0_la-linux_usbfs.o): in function op_get_device_list:os/linux_usbfs.c:1176: error: undefined reference to '__ctype_b_loc'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libusb-1.0_intermediates/libusb-1.0.a(libusb_1_0_la-linux_usbfs.o): in function sysfs_has_file:/opt/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/usr/include/sys/stat.h:455: error: undefined reference to '__xstat'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libusb-1.0_intermediates/libusb-1.0.a(libusb_1_0_la-linux_usbfs.o): in function op_init:/opt/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/usr/include/sys/stat.h:455: error: undefined reference to '__xstat'
해당 stat.h에 가보면 함수는 모두 설정이 되어 있는데 왜 참조를 못하게 에러가 날까요..
bionic,인가 이걸 링크해야하할거 같습니다
그런데 검색해보니꺼
저 함수 정의가 glibc에 있는거 같은데
https://chromium.googlesource.com/arc/arc/+/master/mods/android/bionic/libc/arch-nacl/syscalls/stat.c
보니까
안드로이드는 bioni 라이브러리에 있는거 같은데
https://devjlanza.wordpress.com/2011/09/02/compile-a-native-c-android-application/
보니까 libc.a링크하는거 같긴한데
즐린
댓글 달기