Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with QT_NO_DYNAMIC_CAST
Qt 6.11 is out! See what's new in the release blog

Issue with QT_NO_DYNAMIC_CAST

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    galinette
    wrote on last edited by
    #1

    Dear all,

    I have the following issue : my projects is compiled with the QT_NO_DYNAMIC_CAST defined in the compiler command line option "-DQT_NO_DYNAMIC_CAST" as I can see in QtCreator compiler output. This causes the compilation to fail due to the use of dynamic_cast

    Here are details about the problem:

    • Qt is 4.8.1 compiled with MSVC2010 for x64 platform (64-bit)
    • I did not specify "-no-rtti" to configure, so I suppose the as-stated-in-documentation default "-rtti" was used
    • I checked in the mkspecs/win32-msvc2010 .conf file. Nothing related to RTTI or QT_NO_DYNAMIC_CAST

    And the questions:

    • Where is defined the QT_NO_DYNAMIC_CAST? Neither in the mkspec, nor in my .pro apparently. Also not in my QtCreator build settings. So I really do not know where to disable it...
    • Any other idea?
    • Do I have to recompile Qt?

    Thanks,

    Etienne

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Please post your mkspecs/qconfig.pri.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        galinette
        wrote on last edited by
        #3

        Hi Lukas

        Thanks for your interest in this issue.
        I have actually no qconfig.pri in mkspecs. I checked in the two builds I have installed as binaries with the SDK (MinGW and MSVC x86), they have mkspecs/qconfig.pri. But in the source package I have downloaded, "qt-everywhere-opensource-src-4.8.1.zip", there is no such file. And apparently, none was generated during the build, or it was cleaned by the nmake confclean.

        Thanks,

        Etienne

        1 Reply Last reply
        0
        • G Offline
          G Offline
          galinette
          wrote on last edited by
          #4

          Hi again,

          Seems that "nmake confclean" did remove the qconfig.pri, which should contain CONFIG += rtti
          To avoid recompiling everything, I took the qconfig.pri from the msvc2010 32bit binary, and it seems to work. I will make a full rebuild some day...

          Is there any clean way to strip the qt build so that it is as small as a distributed binary build?

          Thanks,

          Etienne

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lgeyer
            wrote on last edited by
            #5

            <code>make install</code>

            1 Reply Last reply
            0
            • G Offline
              G Offline
              galinette
              wrote on last edited by
              #6

              Hi,

              I will recheck, but I think that make install is not supported for windows builds

              Etienne

              1 Reply Last reply
              0
              • G Offline
                G Offline
                galinette
                wrote on last edited by
                #7

                After some tests, make install does work in windows, but the -prefix option does not. So it installs in the source directory...

                However, I found the solution on another forum. configure.exe may be called from an empty directory using the full path to configure.exe. Then make, make install and make clean do a clean installation inside this previously empty directory. Works perfectly

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved