Results 1 to 7 of 7

Thread: Make environement problem: `Qt' undeclared (first use in this function)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Make environement problem: `Qt' undeclared (first use in this function)

    Hi

    I've been using Qt Creator for a while now and yesterday I created a new shared library using the Qt Creator wizard, but the compilation of the library doesn't want to get through compilation.

    The error messages are below:

    Qt Code:
    1. In file included from c:/Tools/Qt/2009.02/qt/include/QtCore/qnamespace.h:1,
    2. from c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45,
    3. from c:/Tools/Qt/2009.02/qt/include/QtCore/qobjectdefs.h:1,
    4. from c:/Tools/Qt/2009.02/qt/include/QtGui/../../src/gui/kernel/qwindowdefs.h:45,
    5. from c:/Tools/Qt/2009.02/qt/include/QtGui/qwindowdefs.h:1,
    6. from c:/Tools/Qt/2009.02/qt/include/QtGui/../../src/gui/kernel/qwidget.h:45,
    7. from c:/Tools/Qt/2009.02/qt/include/QtGui/qwidget.h:1,
    8. from c:/Tools/Qt/2009.02/qt/include/QtGui/QWidget:1,
    9. from include\QtObserverLibrary\ObserverCollectionDetailsWidget.h:4:
    10. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:54: error: syntax error before "namespace"
    11. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:58: error: syntax error before '{' token
    12. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:135: warning: return type defaults to `int'
    13. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h: In function `Q_DECLARE_FLAGS':
    14. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:136: error: `Qt' undeclared (first use in this function)
    15. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:136: error: (Each undeclared identifier is reported only once
    16. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:136: error: for each function it appears in.)
    17. c:/Tools/Qt/2009.02/qt/include/QtCore/../../src/corelib/global/qnamespace.h:136: confused by earlier errors, bailing out
    18. mingw32-make[1]: Leaving directory `D:/ScinericSoftware/Products/QtObserverLibrary/trunk'
    19. mingw32-make: Leaving directory `D:/ScinericSoftware/Products/QtObserverLibrary/trunk'
    20. mingw32-make[1]: *** [tmp/ObserverCollectionDetailsWidget.o] Error 1
    21. mingw32-make: *** [debug] Error 2
    22. Exited with code 2.
    To copy to clipboard, switch view to plain text mode 

    And below is my .pro file:

    qmake Code:
    1. CONFIG += qt dll ordered
    2. QT += xml
    3.  
    4. TARGET = QtObserverLibrary
    5. TEMPLATE = lib
    6.  
    7. DEFINES += QTOBSERVERLIBRARY_LIBRARY
    8.  
    9. DEPENDPATH += include/QtObserverLibrary \
    10. source
    11. INCLUDEPATH += include/QtObserverLibrary \
    12. source
    13.  
    14. win32:UI_HEADERS_DIR = include/QtObserverLibrary
    15. win32:DLLDESTDIR = bin
    16. win32:DESTDIR = bin
    17. win32:OBJECTS_DIR = tmp
    18. win32:MOC_DIR = tmp
    19. win32:RCC_DIR = tmp
    20. win32:UI_DIR = tmp
    21.  
    22. + Some headers, forms and sources
    To copy to clipboard, switch view to plain text mode 

    Maybe I'm missing something simple, but I just can't seem to get it working. Shouldn't the Qt environment exposed to make by default?

    Thanks for any inputs,
    Regards,
    Jaco
    Last edited by wysota; 24th June 2009 at 12:11.

Similar Threads

  1. Problem with make (can't call moc.exe)
    By johnny_sparx in forum Installation and Deployment
    Replies: 4
    Last Post: 14th September 2007, 13:02
  2. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52
  3. Unable to execute in Debug Mode
    By Kapil in forum Installation and Deployment
    Replies: 38
    Last Post: 5th April 2006, 07:27
  4. lQtGuid4 error - Compiler setting problem
    By Kapil in forum Installation and Deployment
    Replies: 7
    Last Post: 10th February 2006, 09:30
  5. Qt 4.1 and KDE 3.5.1 on OSX 10.2.8
    By Ptero-4 in forum Installation and Deployment
    Replies: 6
    Last Post: 6th February 2006, 02:44

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
  •  
Qt is a trademark of The Qt Company.