赞
踩
报错信息:
[ 64%] Built target opencv_perf_features2d
[ 65%] Built target opencv_test_imgcodecs
[ 66%] Built target opencv_perf_imgcodecs
[ 66%] Linking CXX executable ../../bin/opencv_test_videoio
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_source_set_static_name'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_uri_join'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_uri_split_with_user'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_spawn_async_with_pipes_and_fds'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_uri_split_network'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_uri_is_valid'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_file_set_contents_full'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_memdup2'
/usr/bin/ld: /usr/local/anaconda3/lib/libgio-2.0.so.0: undefined reference to `g_spawn_check_wait_status'
collect2: error: ld returned 1 exit status
make[2]: *** [modules/videoio/CMakeFiles/opencv_test_videoio.dir/build.make:303:bin/opencv_test_videoio] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2478:modules/videoio/CMakeFiles/opencv_test_videoio.dir/all] 错误 2
make: *** [Makefile:166:all] 错误 2
编译器链接错库文件了,真正的库文件在
/lib/x86_64-linux-gnu/libgio-2.0.so.0
库文件的位置可以通过 ldconfig -p | grep libgio 查看
解决办法:
重命名 /usr/local/anaconda3/lib/libgio-2.0.so.0,编译完成后再改回来
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。