[英]While compiling Qt5.9 with VC++2013 - Windows 10, getting error C2440: 'default argument': cannot convert from 'const wchar_t [1]' to 'BSTR'
I am building Qt5.9 with VC++2013, Windows 10. I am getting the error as below: 我正在使用VC ++ 2013,Windows 10构建Qt5.9。出现以下错误:
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. 我已阅读此问题错误C2440:'默认参数':无法从'const wchar_t [1]'转换为'BSTR',但似乎不是我的问题,因为我正在编译Qt5.9,而不是qt应用程序项目。
I found an article about this issue but it is about compiling Qt5.6 ( http://wangjie.rocks/2015/12/28/compile-qt/ ). 我找到了有关此问题的文章,但它与编译Qt5.6( http://wangjie.rocks/2015/12/28/compile-qt/ )有关。 This is a chinese site, I need to translate using chrome.
这是一个中文网站,我需要使用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
. qtbase\\mkspecs\\common\\msvc-base.conf
中没有文件qtbase\\mkspecs\\common\\msvc-base.conf
,但我发现了类似的配置文件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
. 它在编译
qtsystems\\src\\systeminfo\\systeminfo.pro
时弹出错误,因此我在该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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.