PDA

View Full Version : Qt 4.7.4 build problem



redBeard
21st October 2011, 20:13
Environment:

- Windows Vista
- Qt 4.7.4 commercial
- MSVC 2008

Tried to build using the following commands:

c:/Qt/>PATH=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin; \
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE; \
C:\Program Files\Microsoft Visual Studio 9.0\VC\bin

c:/Qt/>set INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\include; \
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include; \
C:\Programs\MySQL\MySQLServer5.1\include

c:/Qt/>set LIB=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib; \
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib; \
C:\Programs\MySQL\MySQLServer5.1\lib\opt

c:/Qt/> configure -debug -commercial -static -qt-sql-mysql \
-qt-sql-odbc -graphicssystem runtime -qt-style-windowsvista \
-no-rtti

(successfully configured)

c:/Qt/> nmake
. . . .
cd shaders\ && "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
. . . .

cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -MP -EHsc -W3 -w34100 -w34189 -DUNICODE
-DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP
-DQT_STATICPLUGIN -DQT_PLUGIN -DQT_DECLARATIVE_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB
-DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE
-DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NO_DYNAMIC_CAST
-I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include\QtOpenGL"
-I"..\..\..\include\QtDeclarative" -I"..\..\..\include" -I"..\..\..\include\ActiveQt"
-I"tmp\moc\debug_static" -I"..\..\..\mkspecs\win32-msvc2008"
-Fotmp\obj\debug_static\ @C:\Users\RUSSLO~1\AppData\Local\Temp\nm2FCF.tmp

qmlshadersplugin_plugin.cpp
shadereffect.cpp
c:\programs\qt\4.7.4.static.debug\include\qtcore\. ./../src/corelib/global/qglobal.h(2372) :
error C2825: 'T': must be a class or namespace when followed by '::'
.\shadereffect.cpp(47) : see reference to function template instantiation 'T qt_dynamic_cast_check<ShaderEffectBuffer*,QPaintDevice*>(X,T *)' being compiled
with
[
T=ShaderEffectBuffer *,
X=QPaintDevice *
]
c:\programs\qt\4.7.4.static.debug\include\qtcore\. ./../src/corelib/global/qglobal.h(2372) :
error C2039: 'dynamic_cast_will_always_fail_because_rtti_is_dis abled' : is not a member of '`global namespace''
c:\programs\qt\4.7.4.static.debug\include\qtcore\. ./../src/corelib/global/qglobal.h(2372) :
error C2146: syntax error : missing ';' before identifier
'dynamic_cast_will_always_fail_because_rtti_is_dis abled'

c:\programs\qt\4.7.4.static.debug\include\qtcore\. ./../src/corelib/global/qglobal.h(2372) :
error C2275: 'T' : illegal use of this type as an expression
.\shadereffect.cpp(47) : see declaration of 'T'

c:\programs\qt\4.7.4.static.debug\include\qtcore\. ./../src/corelib/global/qglobal.h(2372) :
error C2065: 'dynamic_cast_will_always_fail_because_rtti_is_dis abled' : undeclared identifier

Some incompatibilities there? Ideas?

amleto
21st October 2011, 22:13
qt_dynamic_cast_check probably needs rtti.


oh hello there,


error C2065: 'dynamic_cast_will_always_fail_because_rtti_is_dis abled' : undeclared identifier


Could it be any more clear?

d_stranz
23rd October 2011, 22:24
See attached screenshot for where to turn on RTTI in VS 2008. If you're using a Makefile, then you need to add -GR to the cl command options.

7026

redBeard
26th October 2011, 23:33
Could it be any more clear?
Yes, indeed, I saw that message.

I was actually looking for a different type of response, one like: "No, Qt cannot be built with the '-no-rtti' option;" or maybe "Oops, there's a bug in the shader package and the fix is..."

Turns out the correct answer is #2 - there's a bug in Qt shader package. I received a fix from Digia and successfully (re-)built with '-no-rtti' option.