Menu

#50 Visual Studio: "Treat WChar_t as Built in Type" setting needs correction

v1.0_(example)
open
nobody
None
5
2014-05-21
2014-05-21
No

This setting should be set in the same way that it is set in linked Qt version. Qt4 is built with "/Zc:wchar_t-" setting and Qt5 with "Zc:wchar_t".

"Zc:wchar_t" is the default setting, so change is only needed to compile QuaZip against Qt4. IN CMake it may be achieved like that:
if (MSVC)
set_target_properties(quazip PROPERTIES COMPILE_FLAGS "/Zc:wchar_t-")
endif ()

To support such feature in Visual Studio projects added to SVN, it is possible to define new build configurations; instead of 'Debug' and 'Release', they could be called 'Debug-Qt4', etc.

Possible problems when this flag is not set properly:
http://stackoverflow.com/questions/4521252/qt-msvc-and-zcwchar-t-i-want-to-blow-up-the-world
https://bugreports.qt-project.org/browse/QTBUG-35649

Discussion