Results 1 to 4 of 4

Thread: #include <QtScript>

  1. #1
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default #include <QtScript>

    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.
    Qt Code:
    1. 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
    2. In file included from main.cpp:1:
    3. qgraphtest.h:6:25: error: QScriptEngine: No such file or directory
    4. qgraphtest.h:7:24: error: QScriptValue: No such file or directory
    5. make: *** [main.o] Error 1
    To copy to clipboard, switch view to plain text mode 
    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

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: #include <QtScript>

    did you add QT += script to your pro-file?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. The following user says thank you to spirit for this useful post:

    vajindarladdad (5th March 2009)

  4. #3
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: #include <QtScript>

    Quote Originally Posted by spirit View Post
    did you add QT += script to your pro-file?
    of course not

    thank you

  5. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: #include <QtScript>

    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.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 22:46
  2. Error: Using Multiple files
    By 3nc31 in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 10:23
  3. Painting problem
    By Mel in forum Qt Programming
    Replies: 10
    Last Post: 8th May 2007, 22:38
  4. Can't create an object : initialisation problem ?
    By Nyphel in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2007, 10:07
  5. use button from another Window
    By raphaelf in forum Qt Programming
    Replies: 11
    Last Post: 2nd March 2006, 21:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.