我试图从源代码编译OpenCV并创建一个使用新编译的OpenCV库的测试C ++程序。
编译OpenCV似乎工作,我遵循本指南。
但是现在我想创建一个使用库的测试程序。
我遵循这个指南,但一切似乎工作,直到我尝试命令:
./DisplayImage lena.jpg
这给了我以下错误
OpenCV错误:未指定的错误(该功能未实现,用Windows,GTK + 2.x或Carbon支持重建库如果您在Ubuntu或Debian上,请安装libgtk2.0-dev和pkg-config,然后重新运行cmake或者配置脚本)在cvNamedWindow,file / media / chris / Archive2 / Archive / Programming / OpenCV / sav /opencv/modules/highgui/src/window.cpp中,终止在调用'cv :: Exception'什么():/ media / chris / Archive2 / Archive / Programming / OpenCV / sav /opencv/modules/highgui/src/window.cpp:550:error:(-2)该函数未实现。 用Windows,GTK + 2.x或Carbon支持重建库。 如果您在Ubuntu或Debian上,请安装libgtk2.0-dev和pkg-config,然后重新运行cmake或在函数cvNamedWindow中配置脚本
中止(核心倾弃)
提到的软件包似乎已安装
我试过在安装软件包后重新启动计算机,但仍然收到相同的消息。
I'm trying to compile OpenCV from source and create a test C++ program which uses the newly compiled OpenCV library.
Compiling OpenCV appears to work, I followed this guide.
But now I want to create a test program which uses the library.
I followed this guide, but and everything appeared to work until I tried the command:
./DisplayImage lena.jpg
Which gave me the following error
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 cvNamedWindow, file /media/chris/Archive2/Archive/Programming/OpenCV/sav/opencv/modules/highgui/src/window.cpp, line 550 terminate called after throwing an instance of 'cv::Exception' what(): /media/chris/Archive2/Archive/Programming/OpenCV/sav/opencv/modules/highgui/src/window.cpp:550: 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 cvNamedWindow
Aborted (core dumped)
the mentioned packages appear to be installed
I've tried rebooting my computer after installing the packages and I still get the same message.
最满意答案
解决了它
看起来我错过了http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html中提到的一些软件包
即使安装了libgtk和pkg-config
Solved it
Looks like I was missing some of the packages mentioned in http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html
even though libgtk and pkg-config were installed
更多推荐
发布评论