C++ opencv imshow() error, solve!

I used c++ to cross-compile the opencv library, and then successfully compiled the program in ubantu, I put the program on the arm board to execute the program, error:

‘’
OpenCV(3.4.1) 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 D ebian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure scri pt) in cvShowImage, file /home/book/opencv-3.4.1/modules/highgui/src/window.cpp, line 636
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(3.4.1) /home/book/opencv-3.4.1/modules/highgui/src/window.cpp: 636: error: (-2) The function is not implemented. Rebuild the library with Windo ws, 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 cvShowIm age

Aborted
‘’
I found that when I use the imshow(),waitKey(), and destroyWindows() functions, the above error is reported, and the program runs successfully when commented out. Why? Solve!

Sorry, this isn’t ChatGPT.

You could copy the error message into Google.

Google!

1 Like

The mistake is still unresolved. Can you help me?