我有一个在linux上开发的Qt项目,但是现在我需要在windows上编译。我在迁移过程中遇到了一些问题。
我发现的第一个错误是:
C:\Qt\Qt5.5.1\Tools\mingw492_32\i686-w64-mingw32\include\c++\bits\c++0x_warning.h:32: error:
#error This file requires compiler and library support for the ISO C++ 2011 standard.
This support is currently experimental, and must be enabled with the
-std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^这就是我如何把它放在我的项目的.pro中
QMAKE_CXXFLAGS += -std=c++11我也试着用
CONFIG += c++11但问题还在继续。
为了提供更多的信息,我使用了information安装的MinGW编译器以及标题和源代码的扩展:.H和.C (以防这与问题有关,因为我已经看到Qt总是使用.cpp)
这个问题的原因是什么?如果有什么东西不清楚或者需要更多的信息,请告诉我。
发布于 2015-12-23 22:46:56
我解决了这个问题,对我来说,当我更改我的源代码的扩展时,我将.C改为.cc。
https://stackoverflow.com/questions/34417980
复制相似问题