Results 1 to 4 of 4

Thread: Qt 4.7.4 build problem

  1. #1
    Join Date
    Dec 2010
    Posts
    35
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 4.7.4 build problem

    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*,QPaintDe vice*>(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?

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt 4.7.4 build problem

    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?

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 4.7.4 build problem

    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.

    Image1.png

  4. #4
    Join Date
    Dec 2010
    Posts
    35
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.7.4 build problem

    Quote Originally Posted by amleto View Post
    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.

Similar Threads

  1. Qt build problem...
    By antsu in forum Installation and Deployment
    Replies: 2
    Last Post: 27th September 2011, 12:06
  2. Build problem
    By poporacer in forum Newbie
    Replies: 3
    Last Post: 28th September 2010, 00:51
  3. qt build on linux problem
    By paulo_spider in forum Installation and Deployment
    Replies: 0
    Last Post: 14th November 2009, 18:48
  4. A build problem in Qt creator 1
    By Dante in forum Qt Programming
    Replies: 6
    Last Post: 13th March 2009, 17:37
  5. problem after Qt 4.2.2 static build
    By npc in forum Newbie
    Replies: 2
    Last Post: 23rd February 2007, 12:28

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.