If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.5) /home/user/thirdLibrary/opencv/opencv-3.4.5/modules/highgui/src/window.cpp:617: error: (-2: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 function 'cvNamedWindow'
已放弃 (核心已转储)
根据错误提示,我们应该安装
sudo