我再ubuntu下安装OpenCV是编译的时候没有提示错误,但是在运行程序的时候提示:

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 /home/lxj/OpenCV-2.3.1/modules/highgui/src/window.cpp, line 275
terminate called after throwing an instance of 'cv::Exception'
what(): /home/lxj/OpenCV-2.3.1/modules/highgui/src/window.cpp:275: 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
,我百度过了,也谷歌过了,但是就没有确切的解决方法,我确定有装过ibgtk2.0-dev and pkg-config,也重新编译过 ,结果还是一样,希望能得到大侠的指点。

第1个回答  2013-06-14
简单的解释就是你的GTK+2.x要先于OpenCV安装,所以它给的解决方法是You should remove the current installation of opencv from your system; rebuild your opencv lib after installing gtk dev lib in the correct path; and reinstall the compiled opencv lib.
第2个回答  2021-01-19
你的Linux是不是没有GUI
第3个回答  2013-02-19
请按照opencv英文官网的wiki教程安装!!
相似回答