0

我正在尝试从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-devpkg-config都已安装并在其最新版本上。

4

0 回答 0