我已经从源代码构建了opencv 3.0,可以运行一些示例应用程序,根据头文件构建可以,所以我认为它安装成功了。
我也在使用python3,现在我要安装和构建caffe。我在Makefile.config中设置了一些变量,因为我使用的是AMD GPU和Anaconda。
当我运行make all时,我得到了这个错误:
$ make all
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
/usr/bin/ld: .build_release/examples/cpp_classification/classification.o: undefined reference to symbol '_ZN2cv6imreadERKNS_6StringEi'
//usr/local/lib/libopencv_imgcodecs.so.3.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:565: recipe for target '.build_release/examples/cpp_classification/classification.bin' failed
make: *** [.build_release/examples/cpp_classification/classification.bin] Error 1
通过搜索,我认为这与使用openCV 3有关,但我不确定从哪里开始寻找解决方案。有什么帮助吗?
是的,我是一群没有经验的用户中的一员,他们想要摆弄Google Inception学习技术。
发布于 2016-12-09 17:14:58
您可能正在使用OpenCV版本3。如果是,只需在您的Makefile.config
中取消注释以下行
# OPENCV_VERSION := 3
所以它看起来就像
OPENCV_VERSION := 3
您可以通过执行以下操作来验证当前使用的版本:
$ python
>>> import cv2
>>> cv2.__version__
'3.1.0-dev'
发布于 2018-04-16 04:42:08
问题报告非常清楚。链接库libraries.The有问题,原因可能是3.0和2.x之间的差异。您需要添加
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
到库+=中。
https://stackoverflow.com/questions/31253870
复制相似问题