我正在尝试从http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html#display-image编译和运行 DisplayImage OpenCV 示例,但是
cmake
输出:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/####/Desktop/OpenCV/image
make
输出:
Linking CXX executable DisplayImage
[100%] Built target DisplayImage
和./DisplayImage image.jpg
输出:
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/hugo/Desktop/opencv-2.4.6.1/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of 'cv::Exception'
what(): /home/hugo/Desktop/opencv-2.4.6.1/modules/highgui/src/window.cpp:483: 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
Aborted (core dumped)
两者libgtk2.0-dev
和pkg-config
都已安装并在其最新版本上。