简体   繁体   English

在Visual Studio 2017社区版上编译的错误Qt 5.8

[英]Error Qt 5.8 compiling on Visual Studio 2017 Community edition

I installed qt 5.8 with msvc2015 https://download.qt.io/official_releases/qt/5.8/5.8.0/ I also obviously download and installed the qt tools on VS and everything works just fine till now. 我在msvc2015 https://download.qt.io/official_releases/qt/5.8/5.8.0/上安装了qt 5.8,我也显然在VS上下载并安装了qt工具,到目前为止一切正常。 To see if everything worked I tried to open a new project with Visual C++ ---> Qt and then selecting Qt GUI application. 为了查看一切是否正常,我尝试使用Visual C ++ ---> Qt打开一个新项目,然后选择Qt GUI应用程序。 When I tried to compile and run the project I get different error messages on the qalgorithm.h header saying error C3615: a constexpr function cannot return a const value. 当我尝试编译并运行项目时,在qalgorithm.h标头上收到不同的错误消息,提示错误C3615:constexpr函数无法返回const值。 A user here suggested me to see this link bugreports.qt.io/browse/QTBUG-59575 – I tried to replace the qalgorithm.h file with the one in the link. 一位用户在这里建议我查看此链接bugreports.qt.io/browse/QTBUG-59575 –我试图用链接中的qalgorithm.h文件替换它。 The C3615 errors disappeared but it still doesn't compile and gives me errors LNK2038 LNK2019 LNK219 LNK1120 l. C3615错误消失了,但仍然无法编译,并给我错误LNK2038 LNK2019 LNK219 LNK1120 l。 It also gives me a warning : no resources in ...\\QtGuiApplication.qrc 它还给了我一个警告:... \\ QtGuiApplication.qrc中没有资源

What does that mean? 这意味着什么?

When you make big changes in .h or .c files you usually get those linker problems. 在.h或.c文件中进行较大更改时,通常会遇到这些链接器问题。 Sometimes, deleting the build folder and compiling again works 有时,删除构建文件夹并重新编译即可

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM