QtOpenGL:没有这样的文件或目录的OpenCV蟒蛇
当我使用使COMMANDE我得到这个错误QtOpenGL:没有这样的文件或目录的OpenCV蟒蛇
[ 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
我用这个命令来编译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 ..
但proplem还在这里
回答:
你确定你添加了你的Qt文件夹到你的路径吗? 总之,做一些像这样的变化应该有所帮助:
- 转到路径“
/home/sharkawey/op/opencv-master/modules/highgui/src/
”。 - 用您的编辑器打开文件'
window_QT.h
'。 - 更改以下行:
#include <QtOpenGL>
到:
#include <fullpath/QtOpenGL>
替换QtOpenGL的实际路径 'FULLPATH' 字符串。你可以使用find命令找到它。举例来说,如果你的QtOpenGL
位于下“/home/usr/Qt/
”,你应该写:
#include </home/usr/Qt/QtOpenGL>
那么你的编译器知道在哪里可以找到它。我相信对于您的情况,您也可能遇到其他文件的相同情况,并且可以类似地解决它们。
回答:
您需要安装缺少的依赖关系,它可以这样做:
sudo apt-get install libqt5opengl5 libqt5opengl5-dev
以上是 QtOpenGL:没有这样的文件或目录的OpenCV蟒蛇 的全部内容, 来源链接: utcz.com/qa/258856.html