在Vim3Pro上编译OpenCV4.6成功,但是测试时报错

Which Khadas SBC do you use?

Vim3 Pro

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official image

Please describe your issue below:

今天在板子上编译了opencv4.6.0,编译过程没有报错。运行测试程序的时候报错:

Post a console log of your issue below:


terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.6.0) /root/Downloads/opencv-4.6.0/modules/highgui/src/window.cpp:1250: error: (-2:Unspecified error) 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'

请问该如何解决?谢谢

@TedAI 上面已经提示了,安装这个包,然后重新编译opencv