PDA

View Full Version : Possible Qt 4.4.0 bug - project compilation



MarkoSan
12th May 2008, 13:30
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:
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 2The error reffers to following single line of code. What is wrong, I have no clue:
static const qreal M_PI=3.14159265358979323846;

jpn
12th May 2008, 13:34
Does it help if you add #include <QtGlobal>?

MarkoSan
12th May 2008, 14:17
QtGlobal is already included in current source.

MarkoSan
13th May 2008, 06:38
No one does not have a clue?

wysota
13th May 2008, 07:51
Could you prepare a minimal compilable example reproducing the problem?

MarkoSan
13th May 2008, 08:44
You mean code chunk? Here is the line:
static const qreal M_PI=3.14159265358979323846;

Lesiok
13th May 2008, 10:00
You mean code chunk? Here is the line:
static const qreal M_PI=3.14159265358979323846;
I've found in a few QT's source files construction like this :

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

So Your line of code is looking like :


static const qreal 3.14159265358979323846=3.14159265358979323846;

flare
13th May 2008, 10:00
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

MarkoSan
13th May 2008, 10:22
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.

flare
13th May 2008, 10:52
Some more guesses: Did you switch between different Os (Max, Linux, Windows)? Maybe the line endings (http://en.wikipedia.org/wiki/Newline) 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! ;)

jpn
13th May 2008, 10:55
Pssst! Lesiok already found out the problem.

flare
13th May 2008, 11:44
Ok, my fault. The error message trying Lesiok's code looked somehow different on my machine using Visual Studio.

MarkoSan
14th May 2008, 09:38
Problem solved, thanks all of you for help!!!!