Qt Creator, MinGW and C++ 11.
-
Hi to all!
I am using Qt Creator 2.4.0 on Windows 7 32bits and MinGW as the compiler (the one that came with Qt installer program). I am trying to use some features of C++ like "auto" and lambdas with no (compile) success.
Is there a switch that i have to pass to the compiler so to be able to compile this stuff ?
Thanks a lot for any help!
-
@Volker:
It (somewhat) works now. For example, the "auto" is now recognized but a line such as this:
[] { cout << "Hello, my friends"; }();does not compile. So it seems that it "doesn't know" about lambdas!
@Lukas:
You have absolutely right...
My Qt installer, set up compiler stuff at C:\QtSDK\mingw\bin, where i can see gcc.exe and ming32-gcc.exe (among other files) both at version 4.4.0.Do you think i should wait for Qt-Updater to update my installation to a more recent versions of the compiler or should (can) i do it myself without mess up anything ?
Thank you both for the help!
-
I'm unaware of any plans of upgrading MinGW in the Qt SDK (please correct me if I'm wrong). I either would switch to MSVC2010 (the compiler that comes with the express edition can be used to create commercial applications at no cost as well) or a recent version of MinGW, like "TDM-GCC":http://tdm-gcc.tdragon.net/ or "MinGW-w64":http://mingw-w64.sourceforge.net/.
-
Hmm..i installed TDM-GCC and get the up-to-date MinGW stack and now, there is no way i can make GDB work again from inside Creator..."Executable failed. During startup program exited with code 0x0"
I cannot understand why C++ dev-stack is so complicated to setup correctly, at least on Windows.
Anyway.