今天編譯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不然會有問題。在安裝之後重新編譯安裝就沒問題了