Domanda

Voglio provare a utilizzare QML ShaderEffectItem su QGraphicsView

Ho clonato file da https://qt.gitorious.org/qt-labs / qml1-shadersplugin come è scritto in post, e ho compilato questo plugin in ~/Dev/GitRepo/qml1-shadersplugin$:

utilizzando QtCreator, compila questo file: qmlshadersplugin.pro

Ma ora ho eseguito in questa cartella (~ / Dev / GitRepo / qml1-shadersplugin): make install

E ho molti errori::

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

Qual è il problema?

È stato utile?

Soluzione

GL/gl.h: No such file or directory

Questo significa che o non associ un'immagine (molto improbabile) libreria OpenGL, o non è stato consentito nel file qmake (molto probabile). Per abilitare opengl nel file qmake, è necessario aggiungere questa riga:

QT += opengl

qui .

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top