奇怪的编译问题
我从linux转移到android的,对java不熟之前的一个简单的在命令行下可以通过v4l2接口读取摄像头的demo程序,我想移植过来测试一个图像算法,也就一个.c文件和二个头文件,直接这样写的编译命令:
source ../../build/envsetup.sh
aarch64-linux-android-gcc -O2 -I/home/ubuntu/3328_8.1_box/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include-L/home/ubuntu/3328_8.1_box/out/target/product/rk3328_box/system/lib64 -L/home/ubuntu/3328_8.1_box/out/target/product/rk3328_box/obj_arm/lib -o focus.out auto_focus.c
然后报错如下:
/home/ubuntu/3328_8.1_box/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find crtbegin_dynamic.o: No such file or directory
/home/ubuntu/3328_8.1_box/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find crtend_android.o: No such file or directory
这里提到的两个crt*.o文件,均在我的第二个-L指定的目录下,但仍然说找不到,希望大家不吝赐教ubuntu@ubuntu:~/3328_8.1_box/out/target/product/rk3328_box/obj_arm/lib$ ls -l crt*
-rw-rw-r-- 1 ubuntu ubuntu 2000 Apr 29 16:33 crtbegin_dynamic.o
-rw-rw-r-- 1 ubuntu ubuntu 1668 Apr 29 16:33 crtbegin_so.o
-rw-rw-r-- 1 ubuntu ubuntu 2000 Apr 29 16:33 crtbegin_static.o
-rw-rw-r-- 1 ubuntu ubuntu900 Apr 29 16:33 crtend_android.o
-rw-rw-r-- 1 ubuntu ubuntu632 Apr 29 16:33 crtend_so.o 请参考官方wiki教程
页:
[1]