QtOpenGL:没有这样的文件或目录opencv python [英] QtOpenGL: No such file or directory opencv python

查看:272
本文介绍了QtOpenGL:没有这样的文件或目录opencv python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用make命令时,出现此错误

when i use make commande i get this error

[ 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

i used this command to compile 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 ..

但问题仍然存在

推荐答案

确定要添加Qt文件夹到路径吗? 无论如何,进行如下更改应该会有所帮助:

Are you sure you added your Qt folder to your path? Anyway, doing some change like these should help:

  1. 转到路径"/home/sharkawey/op/opencv-master/modules/highgui/src/".
  2. 使用编辑器打开文件"window_QT.h".
  3. 更改以下行:
  1. Go to path '/home/sharkawey/op/opencv-master/modules/highgui/src/'.
  2. Open file 'window_QT.h' with your editor.
  3. Change the following line:

#include <QtOpenGL>

进入:

#include <fullpath/QtOpenGL>

用您的QtOpenGL的实际路径替换'fullpath'字符串.您可以使用find命令找到它.例如,如果您的QtOpenGL位于"/home/usr/Qt/"下,则应输入为:

Replace the 'fullpath' string with your actual path of QtOpenGL. You can find it using find command. For instance, if your QtOpenGL is located under '/home/usr/Qt/', you should write as:

#include </home/usr/Qt/QtOpenGL>

然后,您的编译器就会知道在哪里可以找到它.我相信对于您的情况,其他文件也可能遇到相同的情况,并且您可以类似地解决它们.

Then your compiler knows where to find it. I believe for your case, you may encounter same situations for other files too, and you can solve them similarly.

这篇关于QtOpenGL:没有这样的文件或目录opencv python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆