手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

在Ubuntu上使用Eclipse创建OpenCV项目

[日期:2011-07-28] 来源:Linux社区  作者:here1009 [字体:大 中 小]
3.配置包含文件的路径

Project-->Properties-->C/C++Build-->Settings-->GCC C++ Compiler-->Includes

添加/usr/local/include/opencv。


GCC C++ Linker-->Libraries 中Library search path中添加  /usr/local/lib;Libraries  中添加opencv_cv、opencv_cxcore、opencv_highgui。


点编译运行。(之前在Debug文件夹下放一张图片image.jpg)如果一切顺利的话会看到如下结果:


如果出现红色的提示像我一样。。。就按提示来吧。。。。

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /media/myprogram/OpenCV_2_3_src/modules/highgui/src/window.cpp, line 293
terminate called after throwing an instance of 'cv::Exception'
  what():  /media/myprogram/OpenCV_2_3_src/modules/highgui/src/window.cpp:293: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

安装libgtk2.0-dev和pkg-config

sudo apt-get install libgtk2.0-dev

sudo apt-get install pkg-config


装好之后第4步再来一遍,至少我的经过这样就好了。


初学OpenCV,多多指教。

linux
相关资讯       Eclipse  Ubuntu教程  OpenCV 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款