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} )

最新文章

  1. RK3288 GPIO 输出问题
  2. dede使用方法----调用导航
  3. C++中string转化为常用数值类型
  4. Python中通过cx_Oracle访问数据库遇到的问题总结
  5. hdu 1879 继续畅通工程(最小生成树,基础)
  6. C++ CGI Helloword
  7. ELK配置说明及个人理解
  8. WPF第三方控件Telerik
  9. 在VM12中安装 RedHat RHEL7.2&#160;&#160;系统的详细步骤
  10. 论文笔记(7):Constrained Convolutional Neural Networks for Weakly Supervised Segmentation
  11. 通过漫画轻松掌握HDFS工作原理
  12. JAVA篇&lt;一&gt; 继承extends(已转移到JAVA总结篇)
  13. 运用scrollPic插件的实例
  14. [PHP] 算法-将一个字符串转换成一个整数的PHP实现
  15. JDK1.8HashMap源码解读
  16. Mapnik
  17. android获取内置和外置SD卡路径 - z
  18. js 匿名函数-立即调用的函数表达式
  19. Java 数据表映射
  20. thinkphp下mysql用用户名或者手机号登录

热门文章

  1. How to Pronounce the Numbers 1 – 10
  2. 【367】通过 python 实现 SVM 硬边界 算法
  3. Linux IP和网关配置
  4. Nginx入门安装升级
  5. vue-concise-slider 一个轻量的vue幻灯片组件
  6. 用pandas读取excel报错
  7. Spring Boot application.yml bootstrap.yml
  8. Mysql 表 创建 / 删除(基础3)
  9. 添加setuptools脚本
  10. jquery使用post方法传值