今天编译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不然会有问题。在安装之后重新编译安装就没问题了
推荐阅读:
CentOS下OpenCV无法读取视频文件