How to enable C++0x on QtSDK with MinGw Compiler?
I'm trying to use <regex> on Qt creator but when I include header file or try to use some regex functions i get this message:
*#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This supports currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. *@
I've tried many methods found on internet buy these methods causes other errors.
For example in Code::Blocks is can be easily solved and i think there can be solved too. But how to enable -std=gnu++0x corectly?
Please list the methods that you've already tried. Otherwise, the answers you receive might ask you to repeat what you've already done. It's also useful to say which version of Qt and MinGW you're using.
I'm blocked at exactly here:
@QMAKE_CXXFLAGS += -std=c++0x@
and also tried
@QMAKE_CXXFLAGS += -std=gnu++0x@
in my projects, with the Qt 4.8.0 and Qt 4.8.1 on Windows 7 (64-bit). Both were using mingw4.4.
I get segmentation faults during the compile.
I have QtSDK installed and i think i should update mingw but I don't know how to do it.
MinGW/GCC 4.4 is really old, and people have reported that C++0x support is buggy (http://stackoverflow.com/questions/1414897/using-gccs-c0x-mode-in-production ) Since the segfault happens during compilation, I'd conclude that the problem lies within the compiler.
The old Qt SDK was provided by Nokia and is no longer maintained. Do you need Nokia-specific features? If not, a maintainer of the MinGW-builds project has kindly provided a new SDK for Qt 4.8 + MinGW 4.7/4.8 at http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/ You can uninstall your current Qt SDK and install one of them instead.
And could you help me to know which one to choose from the list that you give me? I've downloaded x64-Qt-5.1.1+qtcreator-2.8.1-(gcc-4.8.1-seh-rev5) and i think it is the source and I don't know how to compile it. Is there any binary installer of this updated sdk? Or, how to compile it?
Hi and welcome to devnet,
If you want the MinGW sdk download "this one":http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-windows-opensource-5.1.1-mingw48_opengl-x86-offline.exe