解压完毕,接下来开始编译Opencv了。
在编译之前,首先确认系统上是否已经安装好libgtk2.0-dev and pkg-config,通过执行以下命令确认。
sudo apt-get install libgtk2.0-dev pkg-config
如果不按照这两个东西,后面运行时会报错
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/aborn/software/OpenCV-2.4.1/modules/highgui/src/window.cpp, line 598
terminate called after throwing an instance of 'cv::Exception'
what(): /home/aborn/software/OpenCV-2.4.1/modules/highgui/src/window.cpp:598: 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