sha*_*har 1 python opengl opencv
当我使用make commande我得到这个错误
[ 24%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o
In file included from /home/sharkawey/op/opencv-master/modules/highgui/src/window_QT.cpp:47:0:
/home/sharkawey/op/opencv-master/modules/highgui/src/window_QT.h:46:20: fatal error: QtOpenGL: No such file or directory
#include <QtOpenGL>
^
compilation terminated.
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)
我用这个命令编译opencv
cmake -D CMAKE_BUILD_TYPE=RELEASE -D INSTALL_C_EXAMPLES=ON
-D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON
-D WITH_QT=ON -D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_OPENGL=ON -D WITH_V4L=ON
-D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_TBB=ON ..
Run Code Online (Sandbox Code Playgroud)
但是问题还在这里
小智 9
您需要安装缺少的依赖项,可以通过以下方式完成:
sudo apt-get install libqt5opengl5 libqt5opengl5-dev
Run Code Online (Sandbox Code Playgroud)