سؤال

I want to try using QML ShaderEffectItem on QGraphicsView

I have cloned files from https://qt.gitorious.org/qt-labs/qml1-shadersplugin how is written in post, and i have compiled this plugin in ~/Dev/GitRepo/qml1-shadersplugin$:

using QtCreator, compiles this file: qmlshadersplugin.pro

But now i run in this folder(~/Dev/GitRepo/qml1-shadersplugin): make install

And i have many: errors:

~/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

What's the problem ?

هل كانت مفيدة؟

المحلول

GL/gl.h: No such file or directory

This means that you either do not have opengl library installed (very unlikely), or you didn't enabled it in your qmake file (very likely). To enable opengl in the qmake file, you need to add this line :

QT += opengl

More about it here.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top