Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 着色器';QML中的插件安装_C++_Qt_Qml - Fatal编程技术网

C++ 着色器';QML中的插件安装

C++ 着色器';QML中的插件安装,c++,qt,qml,C++,Qt,Qml,我想尝试使用 我已经从post中的编写方式中克隆了文件,并在~/Dev/GitRepo/qml1 shadersplugin$中编译了这个插件: 使用QtCreator编译此文件:qmlshadersplugin.pro 但是现在我在这个文件夹中运行(~/Dev/GitRepo/qml1 shadersplugin):make install 我有很多错误: ~/Dev/GitRepo/qml1-shadersplugin$ make installcd src/ && make

我想尝试使用

我已经从post中的编写方式中克隆了文件,并在
~/Dev/GitRepo/qml1 shadersplugin$
中编译了这个插件:

使用QtCreator编译此文件:
qmlshadersplugin.pro

但是现在我在这个文件夹中运行(~/Dev/GitRepo/qml1 shadersplugin):make install

我有很多错误:

~/Dev/GitRepo/qml1-shadersplugin$ make installcd src/ && make -f Makefile install
make[1]: Entering directory `/home/goran/Dev/GitRepo/qml1-shadersplugin/src'
g++ -c -m32 -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DECLARATIVE_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/linux-g++-32 -I. -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtGui -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtDeclarative -I../../../../QtSDK/Desktop/Qt/474/gcc/include -I/usr/X11R6/include -I. -o qmlshadersplugin_plugin.o qmlshadersplugin_plugin.cpp
In file included from ../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL/QtOpenGL:5:0,
                 from shadereffectitem.h:46,
                 from qmlshadersplugin_plugin.cpp:43:
../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL/qgl.h:77:20: fatal error: GL/gl.h: No such file or directory
compilation terminated.
make[1]: *** [qmlshadersplugin_plugin.o] Error 1
make[1]: Leaving directory `/home/igor/Dev/GitRepo/qml1-shadersplugin/src'
make: *** [sub-src-install_subtargets] Error 2
有什么问题吗

GL/gl.h: No such file or directory
这意味着您要么没有安装opengl库(不太可能),要么没有在qmake文件中启用它(很可能)。要在qmake文件中启用opengl,需要添加以下行:

QT += opengl

更多信息。

或者,对我来说,最有可能的是,opengl开发包丢失了,libmesa dev或者类似的东西。