How to use C++11 in QtCreator 2.4.1?
-
Qt Creator 2.4.1 has very limited support for C++0x itself. So you will get strange effects in the UI when using C++0x. None of the CXXFLAGS will change anything there.
What this flag does is to instruct the compiler used by Creator to accept C++0x code. I am not sure how portable this is between compilers, so you might want to only add this flags to gcc based compilers:-)
-
-
"2.5":http://labs.qt.nokia.com/2012/07/25/qt-creator-2-5-1-released/ has improved support for C++11.
-
On a side note, besides newer version of creator you will need a newer version of GCC, since the compiler, shipping with Qt is a rather ancient version with very limited c++11 support. Or alternatively, use it with the MSVC compiler, although GCC 4.7+ has significantly better c++11 feature support, but for MSVC you have precompiled libraries.