Results 1 to 13 of 13

Thread: Possible Qt 4.4.0 bug - project compilation

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Possible Qt 4.4.0 bug - project compilation

    I've succesfully compiled my app under version 4.3.4. 15 minutes ago I switched to 4.4.0 Opensource under XP and under Eclipse (it compiled without problems) and now I get following error:
    Qt Code:
    1. mingw32-make
    2. mingw32-make -f Makefile.Debug
    3. mingw32-make[1]: Entering directory `C:/Documents and Settings/markofr/workspace/Client'
    4. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include" -I"c:\Qt\4.4.0\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.0\mkspecs\win32-g++" -o debug\CShoppingCartDelegate.o CShoppingCartDelegate.cpp
    5. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include" -I"c:\Qt\4.4.0\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.0\mkspecs\win32-g++" -o debug\CShoppingCartView.o CShoppingCartView.cpp
    6. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include" -I"c:\Qt\4.4.0\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.0\mkspecs\win32-g++" -o debug\CShoppingCartModel.o CShoppingCartModel.cpp
    7. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include" -I"c:\Qt\4.4.0\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.0\mkspecs\win32-g++" -o debug\CMerchandizeOrder.o CMerchandizeOrder.cpp
    8. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtCore" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtGui" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include\QtSql" -I"..\..\..\..\Qt\4.4.0\include" -I"c:\Qt\4.4.0\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.4.0\mkspecs\win32-g++" -o debug\CLanguageSelectorWidget.o CLanguageSelectorWidget.cpp
    9. In file included from cdatabasefoundation.h:7,
    10. from CLanguageSelectorWidget.h:30,
    11. from CLanguageSelectorWidget.cpp:1:
    12. globals.h:41: error: expected unqualified-id before numeric constant
    13. globals.h:41: error: expected `,' or `;' before numeric constant
    14. mingw32-make[1]: *** [debug/CLanguageSelectorWidget.o] Error 1
    15. mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/workspace/Client'
    16. mingw32-make: *** [debug] Error 2
    To copy to clipboard, switch view to plain text mode 
    The error reffers to following single line of code. What is wrong, I have no clue:
    Qt Code:
    1. static const qreal M_PI=3.14159265358979323846;
    To copy to clipboard, switch view to plain text mode 
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Does it help if you add #include <QtGlobal>?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Possible Qt 4.4.0 bug - project compilation

    QtGlobal is already included in current source.
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Possible Qt 4.4.0 bug - project compilation

    No one does not have a clue?
    Qt 5.3 Opensource & Creator 3.1.2

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Could you prepare a minimal compilable example reproducing the problem?

  6. #6
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Possible Qt 4.4.0 bug - project compilation

    You mean code chunk? Here is the line:
    Qt Code:
    1. static const qreal M_PI=3.14159265358979323846;
    To copy to clipboard, switch view to plain text mode 
    Qt 5.3 Opensource & Creator 3.1.2

  7. #7
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Quote Originally Posted by MarkoSan View Post
    You mean code chunk? Here is the line:
    Qt Code:
    1. static const qreal M_PI=3.14159265358979323846;
    To copy to clipboard, switch view to plain text mode 
    I've found in a few QT's source files construction like this :
    Qt Code:
    1. #ifndef M_PI
    2. #define M_PI 3.14159265358979323846
    3. #endif
    To copy to clipboard, switch view to plain text mode 
    So Your line of code is looking like :
    Qt Code:
    1. static const qreal 3.14159265358979323846=3.14159265358979323846;
    To copy to clipboard, switch view to plain text mode 

  8. The following user says thank you to Lesiok for this useful post:

    MarkoSan (13th May 2008)

  9. #8
    Join Date
    Jan 2007
    Posts
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Possible Qt 4.4.0 bug - project compilation

    What wysota meant was if you could assemble a package that could be compiled to an executable and includes the error you meantioned, so that one can go through your code and track the error.

    According to the message it seems to me that the error does not derive from the line you've quoted but from one of the lines before (e.g. you could look if there is a semicolon missing).

    Regards, flare

  10. #9
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Well, this is compile time error so I cannot assemble exe file. And, IDENTICAL CODE compiled without errors in 4.3.4. That part is weird to me. I will check other sources for missing semicolon.
    Qt 5.3 Opensource & Creator 3.1.2

  11. #10
    Join Date
    Jan 2007
    Posts
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Some more guesses: Did you switch between different Os (Max, Linux, Windows)? Maybe the line endings screw up your code.
    Make also sure that you did a clean rebuild of your project and that your PATH-variable is set correctly.

    Just some wild speculations, but maybe you give them a try. Good luck!

  12. #11
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Pssst! Lesiok already found out the problem.
    J-P Nurmi

  13. #12
    Join Date
    Jan 2007
    Posts
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Ok, my fault. The error message trying Lesiok's code looked somehow different on my machine using Visual Studio.

  14. #13
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Possible Qt 4.4.0 bug - project compilation

    Problem solved, thanks all of you for help!!!!
    Qt 5.3 Opensource & Creator 3.1.2

Similar Threads

  1. help needed with complicated project
    By Muzz in forum Newbie
    Replies: 12
    Last Post: 15th February 2008, 09:54
  2. Importing qt project to an eclipse workspace
    By isahin in forum Installation and Deployment
    Replies: 2
    Last Post: 28th January 2008, 18:00
  3. QT Project compilation with Dev-Cpp
    By manojmka in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2007, 11:07
  4. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 17:41
  5. Compilation error creating a project on QT4.0.1??
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 8th March 2006, 08:16

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.