wj@wj-Inspiron-:~/Downloads/LBD_Descriptor/build$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wj/Downloads/LBD_Descriptor/build
wj@wj-Inspiron-:~/Downloads/LBD_Descriptor/build$ make
[ %] Built target LineMatchingLib
Linking CXX executable TestLineMatchingAlgorithm
CMakeFiles/TestLineMatchingAlgorithm.dir/TestLineMatchingAlgorithm.cpp.o: In function `cv::String::String(char const*)':
TestLineMatchingAlgorithm.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x30): undefined reference to `cv::String::allocate(unsigned long)'
CMakeFiles/TestLineMatchingAlgorithm.dir/TestLineMatchingAlgorithm.cpp.o: In function `cv::String::String(std::string const&)':
TestLineMatchingAlgorithm.cpp:(.text._ZN2cv6StringC2ERKSs[_ZN2cv6StringC5ERKSs]+0x34): undefined reference to `cv::String::allocate(unsigned long)'
CMakeFiles/TestLineMatchingAlgorithm.dir/TestLineMatchingAlgorithm.cpp.o: In function `main':
TestLineMatchingAlgorithm.cpp:(.text.startup+0xfe): undefined reference to `cv::imread(cv::String const&, int)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x12a): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x21e): undefined reference to `cv::imread(cv::String const&, int)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x24a): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x624): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x7f3): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x89d): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x8a5): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x939): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x941): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0xa96): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0xac9): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0xb53): undefined reference to `cv::String::deallocate()'
TestLineMatchingAlgorithm.cpp:(.text.startup+0xb96): undefined reference to `cv::String::deallocate()'
libLineMatchingLib.so: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
libLineMatchingLib.so: undefined reference to `cv::write(cv::FileStorage&, cv::String const&, cv::Mat const&)'
libLineMatchingLib.so: undefined reference to `cv::FileStorage::FileStorage(cv::String const&, int, cv::String const&)'
libLineMatchingLib.so: undefined reference to `cv::operator<<(cv::FileStorage&, cv::String const&)'
collect2: error: ld returned exit status
make[]: *** [TestLineMatchingAlgorithm] Error
make[]: *** [CMakeFiles/TestLineMatchingAlgorithm.dir/all] Error
make: *** [all] Error

阅读错误之后,感觉是没有找到opencv,搜了相关问题,然后修改了CMakeList.txt,解决了此问题。

PROJECT(LILIANTESTS)
cmake_minimum_required(VERSION 2.8)
find_package( OpenCV REQUIRED ) //这两句可以连接到opencv

add_executable( camera camera.cpp )
target_link_libraries( camera ${OpenCV_LIBS} )

undefined reference to...的更多相关文章

  1. (转) Qt 出现“undefined reference to `vtable for”原因总结

    由于Qt本身实现的机制所限,我们在使用Qt制作某些软件程序的时候,会遇到各种各样这样那样的问题,而且很多是很难,或者根本找不到原因的,即使解决了问题,如果有人问你为什么,你只能回答--不知道. 今天我 ...

  2. undefined reference to `__android_log_print'

    使用android studio 编写NDK代码时出现错误:undefined reference to `__android_log_print' 解决办法: eclipse       andro ...

  3. CentOS 6.5 编译 PHP-7 报错:undefined reference to `libiconv_open 无法编译 PHP libiconv

    ./configure --with-mysql=/backup/mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zli ...

  4. Qt - 错误总结 - 在自定义类头文件中添加Q_OBJECT 编译时报错(undefined reference to ‘vtable for xxThread)

    错误提示:在添加的QThread子类头文件添加Q_OBJECT时,编译程序,出现"undefined reference to 'vtable for xxThread'"错误提示 ...

  5. Qt经典出错信息之undefined reference to `vtable for classname

    原文链接:Qt经典出错信息之undefined reference to `vtable for classname 这个出错信息太常见了,用过Qt两个月以上的朋友基本上都能自己解决了,因为太经典了, ...

  6. 解决undefined reference to `__poll_chk@GLIBC_2.16' 错误

    出现这个错误,是系统的glibc版本太低了,需要更新 到http://ftp.gnu.org/gnu/glibc/下载新版本的glibc,也不用太高,我选择glibc-2.20.tar.gz   解压 ...

  7. ubuntu系统下,gsl 库链接问题 -undefined reference to `cblas_xxx`

    今天在ubuntu系统下进行程序调试的时候出现以下错误信息: [ %] Linking CXX executable ../test_coco /usr/local/lib/libgsl.so: un ...

  8. Android APP使用NDK编译后的ffmpeg库出现undefined reference to 'posix_memalign'错误

    在android程序中使用NDK编译后的ffmpeg库的时候出现了如下错误: jni/libs/libavutil.a(mem.o): in function av_malloc:libavutil/ ...

  9. undefined reference to `Spreadsheet::staticMetaObject'

    <C++ GUI Qt 4 编程>学习 一.遇到的问题 在学完第4章后,Spreasheet程序也已经写好了.在用 FindDialog 搜索时发现没有效果. 二.解决过程 调试跟踪代码, ...

  10. undefined reference to `dlopen'

    g++ -O0 -g3 -I. -Ithird/json -Ithird/core/include -Ithird/vite/include -Ithird/openfst-1.2.10/src/in ...

随机推荐

  1. Eclipse实用操作

    1.缩进:Tab 2.退格:Shift+Tab 3.包结构展开方式:Package Presentation 4.快速定位文件:按ctrl键不放,鼠标移至链接处 5.为属性快速生成相应的get和set ...

  2. t959 unknown device 解决办法

    换机器没用 换数据线没用 最后装了Kies3,好了! -------- 更新 跟数据线也有关系 换一条三星自带的试试

  3. JAVA 泛型的参数的传递示意图

    泛型的两种参数传递方式

  4. python常用字符串处理(转)

    转自https://www.cnblogs.com/houht/p/3308634.html 判断字符串str是否为空 Approach 1:如果字符串长度为0,说明字符串为空,code如下: isN ...

  5. easyui中的几个问题

    easyui中的tree,采用url参数读取json,无法显示.有可能是vs的IIS不支持,$.ajax 原因待测试,有知道的朋友也可以贴代码,我解决的一个办法是 $(function () { $. ...

  6. C++学习二继承

    转载自https://www.cnblogs.com/33debug/p/6666939.html 1.继承与派生  继承是使代码可以复用的重要手段,也是面向对象程序设计的核心思想之一.简单的说,继承 ...

  7. 吴裕雄 python 爬虫(4)

    import requests user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, li ...

  8. RPN(region proposal network)之理解

    在faster-r-cnn 中,因为引入rpn层,使得算法速度变快了不少,其实rpn主要作用预测的是 “相对的平移,缩放尺度”,rpn提取出的proposals通常要和anchor box进行拟合回归 ...

  9. 前往央都之行-gdufe1529

    前往央都之行 Time Limit: 2000/1000ms (Java/Others) Problem Description: 刀光哥桐人和尤吉欧两人为了拯救爱丽丝,同时从卢利特村出发要尽快同时赶 ...

  10. Anaconda安装及配合pycharm使用

    首先到https://www.anaconda.com/download/下载合适的anaconda版本.如Windows 64bit. 下载了直接双击开始下载,一路同意下去,到选择安装的目录.这里选 ...