OpenCV2.3.0编译后运行的问题

2014-11-24 01:04:11 · 作者: · 浏览: 5

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


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不然会有问题。在安装之后重新编译安装就没问题了


推荐阅读