Can't we build Qt with /Zc:wchar_t- flag anymore?
-
Earlier I was using Qt4.5 in my application and both were built with /Zc:wchar_t- flag. Now when i was trying to move it to Qt6.8, I was facing the following error:
qchar.h(79): error C2535: 'QChar::QChar(ushort) noexcept': member function already defined or declared
I found that now the Qt's default flag is with wchar_t as native type, so while configuring i was trying to pass /Zc:wchar_t-. But every time while building QT this flag is getting overridden. Ex:
[1386/1881] Building CXX object qtbase\src\platformsupport\fbconvenience\CMakeFiles\FbSupportPrivate.dir\qfbwindow.cpp.obj cl : Command line warning D9025 : overriding '/Zc:wchar_t-' with '/Zc:wchar_t'
I tried creating a visual studio solution for qtbase and tried building it after changing the setting "Treat wchar_t as built in type" to false, then i am getting the same error from qchar.h
Can't we build QT with /Zc:wchar_t- flag anymore?
Is there any workaround without altering the Qt source file? -
@naveen13 said in Can't we build Qt with /Zc:wchar_t- flag anymore?:
Is there any workaround without altering the Qt source file
No. You might provide a patch and see if it gets accepted though.