PDA

View Full Version : #include <QtScript>



stefan
25th February 2009, 18:26
Hi,
I'm trying to compile a code developed on windows with eclipse and Qt integration.
Everything seems to be OK except preprocessing include command for QtScript.

g++ -c -m64 -pipe -O2 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o main.o main.cpp
In file included from main.cpp:1:
qgraphtest.h:6:25: error: QScriptEngine: No such file or directory
qgraphtest.h:7:24: error: QScriptValue: No such file or directory
make: *** [main.o] Error 1

In eclipse project tree in "Includes" there is "/usr/lib64/qt4/include/QtScript" listed.
Can anybody help mr on this?
I'm using openSUSE 64bit with KDE 4.2
In windows XP same code compiled with no problems. I created eclipse project by using Import -> Qt Project

Thank you

spirit
25th February 2009, 18:32
did you add QT += script to your pro-file?

stefan
25th February 2009, 20:02
did you add QT += script to your pro-file?

of course not :(

thank you

spirit
25th February 2009, 20:04
from Qt Assistant


To link against the module, add this line to your qmake .pro file:
QT += script

so, add it to you profile and rebuild all project.