今天这个问题折磨了我一下午,终于知道是为什么了,心酸历程。。。。。赶紧来记录一下

错误:

/home/wj/workspace/Loitor_VI_Sensor_SDK_V1./SDK/src/camtest2.cpp: In function ‘void* opencv_showimg(void*)’:
/home/wj/workspace/Loitor_VI_Sensor_SDK_V1./SDK/src/camtest2.cpp::: error: ‘imshow’ was not declared in this scope
imshow("left",img_left);
^
/home/wj/workspace/Loitor_VI_Sensor_SDK_V1./SDK/src/camtest2.cpp::: error: ‘imshow’ was not declared in this scope
imshow("right",img_right);
^
/home/wj/workspace/Loitor_VI_Sensor_SDK_V1./SDK/src/camtest2.cpp::: error: ‘imshow’ was not declared in this scope
imshow("left",img_left);
^
make[]: *** [CMakeFiles/camtest2.dir/src/camtest2.cpp.o] Error
make[]: *** [CMakeFiles/camtest2.dir/all] Error
make: *** [all] Error

出现这种问题的时候,一般是头文件不对,查一下你库存放的位置,版本不同 #include 后面写的是不同。

他原来的程序是

#include <cv.h>
#include <highgui.h>

而我的头文件是

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

这样修改就好了。。。所以写成自己的才能调用成功。。。。。

最新文章

  1. 让 Ubuntu 桌面自动更换壁纸
  2. 【转载总结】jQuery和HTML5全屏焦点图
  3. Python中的对象类型的初步介绍
  4. sql 字符次数
  5. 【使用 DOM】使用 Window 对象
  6. POJ 3169 Layout (spfa+差分约束)
  7. android startActivityForResult(Intent intent, int requestCode) 整理与总结! .
  8. MFC VS2005 添加Override 和 Message
  9. ural 1180 Stone Game
  10. windows server 2008 应用程序池自动关闭 C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load
  11. 玩转Web之easyui(三)-----easy ui dataGird 重新指定url以获取不同数据源信息
  12. 第13天 JSTL标签、MVC设计模式、BeanUtils工具类
  13. C语言-switch语句
  14. sql server 2000的安装
  15. 2019-01-20 JavaScript实现ZLOGO: 界面改进与速度可调
  16. nodejs,mongodb不同时区问题
  17. windows系统安装python3.6.3和python3.7.0
  18. MATLAB常微分方程的数值解法
  19. WebAPI 消息处理器
  20. JavaScript 二维数组排列组合

热门文章

  1. 关于Linux服务器磁盘空间占满问题的解决方法
  2. 含有不等式约束的优化问题——KKT条件
  3. tornado.gen 模块解析
  4. php mysql_db_query()函数使用介绍
  5. Solr优化案例分析
  6. a标签解析url
  7. jpa-jpql-basic-test
  8. ubuntu 安装 环境
  9. ncodeURIComponent() 函数 vue内容
  10. Tomcat SSL配置及Tomcat CA证书安装