I am building Qt5.9 with VC++2013, Windows 10. I am getting the error as below:
C2440: 'default argument': cannot convert from 'const wchar_t [1]' to 'BSTR.
I have read this question error C2440: 'default argument': cannot convert from 'const wchar_t [1]' to 'BSTR' but seem not my problem because I am compiling Qt5.9, not qt app project.
I found an article about this issue but it is about compiling Qt5.6 (http://wangjie.rocks/2015/12/28/compile-qt/). This is a chinese site, I need to translate using chrome. There is no file qtbase\mkspecs\common\msvc-base.conf
in Qt5.9 but I found a similar config file qtbase\mkspecs\common\msvc-version.conf
. I did the same but it doesn't work.
I found solution.
It pops up error while compile qtsystems\src\systeminfo\systeminfo.pro
so I added bellow config to that systeminfo.pro
. It works.
win32: QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
win32: QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
win32: QMAKE_CFLAGS -= -Zc:strictStrings
win32: QMAKE_CXXFLAGS -= -Zc:strictStrings