在运行ORBSLAM3时出现报错:The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa 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是否安装正确
在终端运行:
sudo aptitude search libgtk2.0-dev
如果没问题应该会出现:
i libgtk2.0-dev - development files for the GTK+ library
p libgtk2.0-dev:i386 - development files for the GTK+ library
在opencv文件夹里面创建Release文件夹
在终端运行:
cd /home/user_name/opencv4.2.0
mkdir Release
cd Release
再在终端运行:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..
再在终端运行:
make
sudo make install
使用aptitude安装lbgtk2.0-dev
在终端运行:
sudo aptitude install libgtk2.0-dev
应该就可以解决问题了
参考:https://stackoverflow.com/questions/28776053/opencv-gtk2-x-error-unspecified-error-the-function-is-not-implemented