caffe: compile error : undefined reference to `cv::imread(cv::String const&, int)' et al.
when I compile caffe file :
.build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
.build_debug/lib/make: libcaffe.so: undefined *** [.build_debug/tools/upgrade_net_proto_text.bin] Error 1
referencemake: *** Waiting for unfinished jobs....
to `cv.build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::/_InputArray const&, usrint)/bin/'ld:
warning: libcudart.so.5.5, needed by /usr/local/lib/libopencv_core.so, may conflict withcollect2: error: ld returned 1 exit status
libcudart.so.7.5
.build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector.<int, std::allocatorbuild_debug<int> /> constlib&)'/libcaffe.so
.build_debug/: lib/undefined referencelibcaffe.so: to make: `*** [.build_debug/tools/upgrade_net_proto_binary.bin] Error 1cvundefined: :referenceimread
( tocv:: `String cvconst&::imdecode, int(cv)'
.::_InputArraybuild_debug/ const&lib, int/)'
libcaffe.so: undefined reference to `cv::imencode(cv:collect2: error: ld returned 1 exit status
:String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_debug/lib/libcaffe.so: make: undefined reference*** [.build_debug/tools/caffe.bin] Error 1 to
`cv::imdecode(cv::_InputArray const&, int)'
::imread(cv::String const&, int)'
collect2: error: ld returned 1 exit status
.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
make: *** [.build_debug/tools/extract_features.bin] Error 1collect2: error: ld returned 1 exit status
make: *** [.build_debug/tools/compute_image_mean.bin] Error 1
.build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_debug/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
make: *** [.build_debug/tools/convert_imageset.bin] Error 1
wangxiao@wangxiao-GTX980:/media/wangxiao/247317a3-e6b5-45d4-81d1-956930526746/---------------/caffe-master$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Answer: https://github.com/BVLC/caffe/issues/2348
But if you delete all the file in build(rm -rf ./build/*) before "make all",you will success.I just success
so, just input the code and make all -j8 again.
well, same problem... and change the following code in Makefile:
>>>>>>>> LIBRARIES += opencv_core opencv_highgui opencv_imgproc
into : LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
yeah, just add the: opencv_imgcodecs at last. and it really worked.
thus, the following steps may needed:
1. change the Makefile :
add "opencv_imagecodecs" to the last of LIBRARIES += opencv_core opencv_highgui opencv_imgproc;
2. remove the files in build :
rm -rf ./build/*
3. make all -j8
caffe: compile error : undefined reference to `cv::imread(cv::String const&, int)' et al.的更多相关文章
- test.cpp:(.text+0xc0): undefined reference to `cv::imread(std::string const&, int)'
opencv报错: test.cpp:(.text+0xc0): undefined reference to `cv::imread(std::string const&, int)' te ...
- error: undefined reference to `cv::imread(std::string const&, int)'
g++ main.cpp -o main `pkg-config --libs --cflags opencv`注意--libs的位置https://stackoverflow.com/questio ...
- undefined reference to cv::imread(cv::String const&, int)
.build_release/lib/libcaffe-nv.so: undefined reference to cv::imread(cv::String const&, int)' .b ...
- Opencv3.0: undefined reference to cv::imread(cv::String const&, int)
使用opencv,编译出错: undefined reference to cv::imread(cv::String const&, int) 自opencv3.0之后,图像读取相关代码在i ...
- Caffe 编译: undefined reference to imencode()
本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/52150781 整理之前编译工程中遇到的 ...
- error: undefined reference to `XXX::XXX(type1, ypte2)
moc_fortunethread.cpp:100: error: undefined reference to `FortuneThread::GetToParentThread(QString, ...
- RK3288 error: undefined reference to 'LOGD'
HAL层和JNI层中的打印都必须包含下面的宏和头文件. 比如:LOGD.LOGE等等. #define LOG_TAG "TEST_LED" #include <utils/ ...
- error: undefined reference to 'av_register_all()'
cygwin下ndk编译工程中使用ffmpeg时出现的错误:“error: undefined reference to 'av_register_all()'” 使用ffmpeg的源文件是 *.c ...
- Undefined symbols for architecture i386: "MyGetOpenALAudioData(__CFURL const*, int*, int*, int*)"
今天把apple developer上的例子程序oalTouch中的MyOpenALSupport.h和MyOpenALSupport.c添加到自己的工程中,并在另一个文件xxx.cpp里调用,结果出 ...
随机推荐
- SharePoint 2013 Nintex Workflow 工作流帮助(二)
博客地址 http://blog.csdn.net/foxdave 工作流动作 1. Action Set(Logic and flow分组) 它是一个工作流的集合,可以理解为容器的东西.所以它本身并 ...
- JDBC体会
1.把mysql-connector XXXX版本导入buildpath 2.通过DriverManager 的getConnection 方法获得一个Connnection引用,方法的参数是 url ...
- IOS 实现自定义的导航栏背景以及自定义颜色的状态栏(支持7.0以及低版本)
为尊重文章原作者,转载务必注明原文地址:http://www.cnblogs.com/wt616/p/3784717.html 先看效果图: 在自定义导航栏背景时,可能会遇到以下一些问题: 1.当设置 ...
- hdu 2037
PS: - -原本想的是排序开始时间和消耗时间..后来想到可以排序结束时间..后来还wa了一次,因为排序的时候溢出了 思路: 1 3 //13 4 //20 7 3 8 2 9 5 10 //36 ...
- AFNnetworking入门
AFNetworking官网入门教程简单翻译,学习 AFNetworking 是一个能够快速使用的ios和mac os x下的网络框架,它是构建在Foundation URL Loading Syst ...
- 在android的spinner中,实现取VALUE值和TEXT值。 ZT
在android的spinner中,实现取VALUE值和TEXT值. 为了实现在android的 spinner实现取VALUE值和TEXT值,我尝试过好些办法,在网上查的资料,都是说修改适配器, ...
- JQuery源码分析(八)
jQuery的each迭代器 jQuery的each方法从使用上就要分2种情况: $.each()函数 $(selector).each() $.each()函数和$(selector).each() ...
- jqGrid详解及高级应用(十四)
一:jqGrid 是一个用来显示网格数据的jQuery插件,文档比较全面,附带中文版本. 二:官方主页http://www.jqgrid.com/目前最新版本:jqGrid 3.7 Beta在线文档 ...
- Android PermissionChecker 权限全面详细分析和解决方案
原文: http://www.2cto.com/kf/201512/455888.html http://blog.csdn.net/yangqingqo/article/details/483711 ...
- 用Inno Setup来解决.NetFramework安装问题
用Inno Setup来解决.NetFramework安装问题 2010-03-01 09:59:26 标签:.Net Framework Setup 休闲 Inno 原创作品,允许转载,转载时请务必 ...