0

I have a Qt project develop on linux, but now I need to compile on windows. I'm having a couple of problems in the migration process.

The first error I'm getting it's:

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 \
^

and this it's how I'm putting it in the .pro of my project

QMAKE_CXXFLAGS += -std=c++11

I also try with

CONFIG += c++11

but the problem continuous.

To give a little more of information, I'm using the MinGW compiler that the Qt Creator install and the extension of my Headers and Sources are: .H and .C (Just in case this have anything to do with the problem, because I've seen that Qt always uses .cpp)

What could be the cause of the problem ?? If something it's unclear or more information it's needed please let me know.

SujaM
  • 409
  • 6
  • 16
  • Which version of gcc is mingw using ? In gcc 4.6, the right flag was still called c++0x. – Claudio Dec 22 '15 at 15:05
  • http://stackoverflow.com/questions/11066068/how-to-program-c11-using-qt5 – phyatt Dec 22 '15 at 15:37
  • This problem was fixed by changing the extension of the .C files to .cc. Thanks though. – SujaM Dec 22 '15 at 16:22
  • `CONFIG += c++11` should work. Did you run `qmake` after making the change? – Felix Dec 22 '15 at 22:38
  • I did, every time I change the .pro I'll clean run qmake and the build the project. But like I said this problem was fixed thanks for your contribution. – SujaM Dec 23 '15 at 13:57

1 Answers1

0

I solve the problem, for me it worked when I change the extension of my sources, I change .C for .cc

SujaM
  • 409
  • 6
  • 16