PDA

View Full Version : Qt 4.4.1 Compile Error with MS Visual C++ 2008 Express SP1



BrainB0ne
19th August 2008, 07:46
Hello,

i have problems compiling Qt 4.4.1 on a WinXP 32bit machine. I tried to compile it with the latest MS Visual C++ 2008 Express SP1.

it gives the following error... here is a part of the build log:



C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C21
43: syntax error : missing ')' before 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(87) : s
ee reference to class template instantiation 'std::tr1::_Pmd_caller<_Ret,_Arg0>'
being compiled
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C21
43: syntax error : missing ';' before 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C22
38: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C29
88: unrecognizable template declaration/definition
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C20
59: syntax error : 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(62) : error C20
59: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(70) : error C23
34: unexpected token(s) preceding '{'; skipping apparent function body
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C21
43: syntax error : missing ')' before 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C21
43: syntax error : missing ';' before 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C22
38: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C29
88: unrecognizable template declaration/definition
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C20
59: syntax error : 'constant'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(76) : error C20
59: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xrefwrap(84) : error C23
34: unexpected token(s) preceding '{'; skipping apparent function body
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

C:\Qt\4.4.1>


I saw this problem also on the german Qt Forum, there someone suggested to disable building the Qt-Webkit module. Here's the thread.. http://www.qtforum.de/forum/viewtopic.php?p=36806&sid=2ac604ddadd46a3650695d464a42c565

Does anyone have similar problems or a better solution? :)

bitChanger
19th August 2008, 12:24
To resolve, remove the line “#include <xmath.h>” from C:\qt\4.4.0\src\3rdparty\webkit\JavaScriptCore\wtf \MathExtras.h

The header file xmath.h does a #define _F0 1, and the file xrefwrap uses the name _F0 as a parameter in a templates.

This is an issue that Microsoft needs to fix.

BrainB0ne
19th August 2008, 14:18
To resolve, remove the line “#include <xmath.h>” from C:\qt\4.4.0\src\3rdparty\webkit\JavaScriptCore\wtf \MathExtras.h

The header file xmath.h does a #define _F0 1, and the file xrefwrap uses the name _F0 as a parameter in a templates.

This is an issue that Microsoft needs to fix.

Thx, it seems to do the trick :D

It's building again.... :)

pdolbey
19th August 2008, 15:49
Microsoft are unlikeley to fix this - see https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=361804&wa=wsignin1.0 (if you can log in).

Its an issue than might need directing towards the WebKit developers, or I can see this change beeing needed for every Qt release until VC10 finally breaks it.

Pete