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.的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. Opencv3.0: undefined reference to cv::imread(cv::String const&, int)

    使用opencv,编译出错: undefined reference to cv::imread(cv::String const&, int) 自opencv3.0之后,图像读取相关代码在i ...

  5. Caffe 编译: undefined reference to imencode()

    本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/52150781 整理之前编译工程中遇到的 ...

  6. error: undefined reference to `XXX::XXX(type1, ypte2)

    moc_fortunethread.cpp:100: error: undefined reference to `FortuneThread::GetToParentThread(QString, ...

  7. RK3288 error: undefined reference to 'LOGD'

    HAL层和JNI层中的打印都必须包含下面的宏和头文件. 比如:LOGD.LOGE等等. #define LOG_TAG "TEST_LED" #include <utils/ ...

  8. error: undefined reference to 'av_register_all()'

    cygwin下ndk编译工程中使用ffmpeg时出现的错误:“error: undefined reference to 'av_register_all()'” 使用ffmpeg的源文件是  *.c ...

  9. Undefined symbols for architecture i386: "MyGetOpenALAudioData(__CFURL const*, int*, int*, int*)"

    今天把apple developer上的例子程序oalTouch中的MyOpenALSupport.h和MyOpenALSupport.c添加到自己的工程中,并在另一个文件xxx.cpp里调用,结果出 ...

随机推荐

  1. Mvc5 Html.EditorFor

    如果对缺省的样子不满意, 可以有模板,寻寻觅觅,摸索出 在Views\Shared\EditorTemplates下创建String.cshtml 必须的是EditorTemplates文件夹 @{ ...

  2. ZOJ 3329 - One Person Game

    题意:每次筛三个骰子面分别为k1,k2,k3,如果三个骰子的值分别为a,b,c则得分置0,否则得到分数加上三个骰子的值的和,如果得分大于等于n则结束游戏. 设E[i]表示当前得到i分时结束游戏的期望. ...

  3. android的 makefile里 的常用 宏定义

    在Android编译框架中,把许多固定的.反复用到的目录路径定义为 宏变量,常用 宏 如下: out/target/product/xxx的宏即为:PRODUCT_OUT out/target/pro ...

  4. LeetCode---- 二叉树中,找出和为某值的所有路径

    Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given su ...

  5. HDOJ-三部曲-1002-Radar Installation

    Radar Installation Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 20000/10000K (Java/Other) ...

  6. Git的环境搭建

    Git时当下流行的分布式版本控制系统. 集中式版本控制系统的版本库是集中存放在中央处理器的,所以开发者要先从中央服务器获取最新的版本,编码后再将自己的代码发送给中央处理器.集中式版本控制系统最大的缺点 ...

  7. GIT之一 起步篇

    关于版本控制 版本控制是一种记录一个或若干文件内容变化,以便将来查阅特定版本修订情况的系统.如果你是位图形或网页设计师,可能会需要保存某一幅图片或页面布局文件的所有修订版本.采用版本控制系统(VCS) ...

  8. pscp使用详解 Windows与Linux文件互传工具

    pscp使用详解 Windows与Linux文件互传工具 pscp使用方法详解:pscp是putty安装包所带的远程文件传输工具,是一款十分常见windows与linux系统之间文件互传的工具,使用方 ...

  9. magento在产品详细页面添加分享链接的方法

    1,在产品详细页面的对用位置加入一下代码 <div class="sharethis_box">          <?php echo $this->ge ...

  10. 多界面开发 、 导航控制器(NavigationController)

    1 VC之间的跳转和正向传值 1.1 问题 在实际的开发中更多的应用都会有多个页面组成,每个页面展示不同的信息,页面之间的跳转是由视图控制器来实现的,本案例实现两个页面的之间的跳转和页面之间的正向传值 ...