OpenCV2.3.0编译后运行的问题


今天编译opencv2.3.0写的一个文件,发现编译的时候编译器无错误编译通过但是却在运行的时候出现了如下的错误

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/bush/opencv/OpenCV-2.3.0/modules/highgui/src/window.cpp, line 275

terminate called after throwing an instance of 'cv::Exception'

what():  /home/bush/opencv/OpenCV-2.3.0/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

根据提示先安装 libgtk2.0-dev 和 pkg-config不然会有问题。在安装之后重新编译安装就没问题了

推荐阅读:

Ubuntu 12.04 安装 OpenCV2.4.2

CentOS下OpenCV无法读取视频文件

Ubuntu 12.04下安装OpenCV 2.4.5总结

Ubuntu 10.04中安装OpenCv2.1九步曲

基于QT和OpenCV的人脸识别系统

相关内容