@memory 好巧,我正在尝试交叉编译opencv,刚刚我看了下发现buildroot竟然支持一键操作,太棒了
Sophus 发布的帖子
-
回复: [同济课堂问题] 在交叉编译过程中引用了opencv库报错
-
回复: [同济课堂问题] 在交叉编译过程中引用了opencv库报错
@xiaowenge 我看了楼下的评论好像明白了,似乎opencv也需要交叉编译才可以链接,我下午试一下
-
回复: [同济课堂问题] 在交叉编译过程中引用了opencv库报错
@xiaowenge 这个opencv是我从github下载的,然后再ubuntu14上进行编译得到的。
-
[同济课堂问题] 在交叉编译过程中引用了opencv库报错
我在项目中使用了opencv,使用交叉编译工具进行编译时,链接了opencv的lib,报错如下:
attempted static link of dynamic object `/usr/local/lib/libopencv_highgui.so.4.5.4'
根据提示我尝试将tool chain 的-static标志去掉,报错如下:
usr/local/lib/libopencv_highgui.so.4.5.4: error adding symbols: file in wrong format我开启了cmake的DEBUG模式,这是我报错前最后连接的g++ 指令
/home/david/Downloads/riscv64-linux-x86_64-20210512/bin/riscv64-unknown-linux-gnu-g++ --sysroot=/home/david/Downloads/riscv64-linux-x86_64-20210512/sysroot -march=rv64gcvxtheadc -mabi=lp64d -mtune=c906 -DRVV_SPEC_0_7 -D__riscv_zfh=1 -static -frtti -O2 -g -DNDEBUG -rdynamic CMakeFiles/main.dir/src/main.cpp.o CMakeFiles/main.dir/src/UltraFace.cpp.o -o main -Wl,-rpath,/usr/local/lib ncnn_build/src/libncnn.a /usr/local/lib/libopencv_highgui.so.4.5.4 /usr/local/lib/libopencv_ml.so.4.5.4 /usr/local/lib/libopencv_objdetect.so.4.5.4 /usr/local/lib/libopencv_photo.so.4.5.4 /usr/local/lib/libopencv_stitching.so.4.5.4 /usr/local/lib/libopencv_video.so.4.5.4 /usr/local/lib/libopencv_videoio.so.4.5.4 -lpthread /usr/local/lib/libopencv_imgcodecs.so.4.5.4 /usr/local/lib/libopencv_calib3d.so.4.5.4 /usr/local/lib/libopencv_dnn.so.4.5.4 /usr/local/lib/libopencv_features2d.so.4.5.4 /usr/local/lib/libopencv_flann.so.4.5.4 /usr/local/lib/libopencv_imgproc.so.4.5.4 /usr/local/lib/libopencv_core.so.4.5.4
感觉是一个比较简单的问题,但是我查阅了文档没有得到合适的帮助,如果能得到帮助将感激不尽!