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:
Code:
mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Documents and Settings/markofr/workspace/Client'
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
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
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
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
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
In file included from cdatabasefoundation.h:7,
from CLanguageSelectorWidget.h:30,
from CLanguageSelectorWidget.cpp:1:
globals.h:41: error: expected unqualified-id before numeric constant
globals.h:41: error: expected `,' or `;' before numeric constant
mingw32-make[1]: *** [debug/CLanguageSelectorWidget.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/workspace/Client'
mingw32-make: *** [debug] Error 2
The error reffers to following single line of code. What is wrong, I have no clue:
Code:
static const qreal M_PI=3.14159265358979323846;
Re: Possible Qt 4.4.0 bug - project compilation
Does it help if you add #include <QtGlobal>?
Re: Possible Qt 4.4.0 bug - project compilation
QtGlobal is already included in current source.
Re: Possible Qt 4.4.0 bug - project compilation
No one does not have a clue?
Re: Possible Qt 4.4.0 bug - project compilation
Could you prepare a minimal compilable example reproducing the problem?
Re: Possible Qt 4.4.0 bug - project compilation
You mean code chunk? Here is the line:
Code:
static const qreal M_PI=3.14159265358979323846;
Re: Possible Qt 4.4.0 bug - project compilation
Quote:
Originally Posted by
MarkoSan
You mean code chunk? Here is the line:
Code:
static const qreal M_PI=3.14159265358979323846;
I've found in a few QT's source files construction like this :
Code:
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
So Your line of code is looking like :
Code:
static const qreal 3.14159265358979323846=3.14159265358979323846;
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
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.
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! ;)
Re: Possible Qt 4.4.0 bug - project compilation
Pssst! Lesiok already found out the problem.
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.
Re: Possible Qt 4.4.0 bug - project compilation
Problem solved, thanks all of you for help!!!!