Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.1
-
None
-
Windows 7, MSVC 2012
-
39346df12cf5f755dc45a99680576e392945307c.(stable, 26.2.2014,5.3)
Description
When using MSVC (at least), sources built with rtti enabled vs. disabled are not binary compatible when statically linking. This is because the virtual tables have different sizes depending on rtti status, and static linking enforces one executable-wide copy of the virtual table for all classes, including STL classes used by ANGLE.
The ANGLE build configuration forcibly disables rtti for the release build: qtbase\src\angle\src\config.pri has "CONFIG += rtti_off".
Subsequently, when linking any STL-using projects, the following warnings are emitted. Those are, in fact, bugs, as they randomly cause RTTI not to be available for some STL classes:
warning C4743: 'const std::system_error::`vftable'' has different size in 'C:\Qt\5.2.1-src\qtbase\src\3rdparty\angle\src\libGLESv2\Context.cpp' and '(customer code, removed)': 16 and 12 bytes
warning C4743: 'const std::ios_base::failure::`vftable'' has different size in 'C:\Qt\5.2.1-src\qtbase\src\3rdparty\angle\src\libGLESv2\Context.cpp' and '(customer code, removed)': 16 and 12 bytes
warning C4743: 'const std::runtime_error::`vftable'' has different size in 'C:\Qt\5.2.1-src\qtbase\src\3rdparty\angle\src\libGLESv2\Context.cpp' and '(customer code, removed)': 16 and 12 bytes
A search across the qtbase module indicates that ANGLE is the only offender in this respect.
The fix is to remove the "CONFIG += rtti_off" line fron ANGLE's config.pri. I don't have Qt's repository pulled here, so I can't use git blame to check if there was a discernible reason for this line's presence.