Issue with QT_NO_DYNAMIC_CAST
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?
Please post your mkspecs/qconfig.pri.
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.
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?
I will recheck, but I think that make install is not supported for windows builds
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