[Development] Shall we turn on /utf-8 compiler option when build qt for Windows?
Liang Jian
jianliang79 at gmail.com
Sun Jan 29 05:13:48 CET 2017
Start from qt-5.8 I can't build qt anymore under Windows(simplified
chinese locale). Since there is a file
src/plugins/generic/tuiotouch/qtuiohandler.cpp which contain non-latin-1
character, msvc2015 assume the source code's character set should be CP936
which make the complilation fail.
I can only build qt by comment the line which contain the specical
character in src/plugins/generic/tuiotouch/qtuiohandler.cpp.
But if I turn on -developer-build in configuration step, thing will get
worse than before, since -developer-build means treat warning as error, and
again I can't build qt anymore since there are other files contain
non-latin1 character (such as qstring.cpp), the build will fail due to the
character set warning.
I am working on a Windows 10 x64 simplifed chinese machine, msvc2015
update3
For more detail please refer to
https://bugreports.qt.io/browse/QTBUG-58161
As a workaround, I have to modify the file
qtbase/mkspecs/common/msvc-desktop.conf
QMAKE_CFLAGS = -nologo -Zc:wchar_t /utf-8
After I add /utf-8 compiler option the build goes well.
Shall we turn on this compiler option by default?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170129/b7e4273d/attachment.html>
More information about the Development
mailing list