Results 1 to 4 of 4

Thread: New Win install, Hello World compile error.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default New Win install, Hello World compile error.

    I have just installed 4.3.4 (from installer, not compiled from source). I cut and pasted the "Hello World" example out of Examples & Demos and get the following errors:

    C:\Data\IT\Forms\hi>make
    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Data/IT/Forms/hi'
    gcc -c -O2 -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUP
    PORT -DQT_NEEDS_QMAIN -I"..\..\..\Qt4.3.4\include\QtCore" -I"..\..\..\Qt4.3.4\include\QtCore" -I"..\..\..\Qt4.3.4\i
    nclude\QtGui" -I"..\..\..\Qt4.3.4\include\QtGui" -I"..\..\..\Qt4.3.4\include" -I"." -I"c:\Data\Qt4.3.4\include\Acti
    veQt" -I"release" -I"." -I"..\..\..\Qt4.3.4\mkspecs\win32-g++" -o release\hi.o hi.c
    In file included from ../../../Qt4.3.4/include/QtCore/qnamespace.h:1,
    from ../../../Qt4.3.4/include/QtCore/../../src/corelib/kernel/qobjectdefs.h:47,
    from ../../../Qt4.3.4/include/QtCore/qobjectdefs.h:1,
    from ../../../Qt4.3.4/include/QtCore/../../src/corelib/kernel/qobject.h:49,
    from ../../../Qt4.3.4/include/QtCore/qobject.h:1,
    from ../../../Qt4.3.4/include/QtCore/../../src/corelib/kernel/qcoreapplication.h:47,
    from ../../../Qt4.3.4/include/QtCore/qcoreapplication.h:1,
    from ../../../Qt4.3.4/include/QtGui/../../src/gui/kernel/qapplication.h:47,
    from ../../../Qt4.3.4/include/QtGui/qapplication.h:1,
    from ../../../Qt4.3.4/include/QtGui/QApplication:1,
    from hi.c:1:
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:51: error: syntax error before "QT_MODULE"
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:54: error: syntax error before "namespace"
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:58: error: syntax error before '{' token
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:117: warning: return type defaults to `int'
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h: In function `Q_DECLARE_FLAGS':
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:118: error: `Qt' undeclared (first use in thi
    s function)
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:118: error: (Each undeclared identifier is re
    ported only once
    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:118: error: for each function it appears in.)

    ../../../Qt4.3.4/include/QtCore/../../src/corelib/global/qnamespace.h:118: confused by earlier errors, bailing out
    mingw32-make[1]: *** [release/hi.o] Error 1
    mingw32-make[1]: Leaving directory `C:/Data/IT/Forms/hi'
    mingw32-make: *** [release] Error 2
    Thanks
    Last edited by jpn; 3rd April 2008 at 06:30. Reason: missing [quote] tags

Similar Threads

  1. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  2. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  3. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 17:04
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52

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.