[Solved] I cant use "auto" keyword in Qt 5.1.2 into Ubuntu
-
wrote on 23 Mar 2014, 06:04 last edited by
Hi.
Im trying to develope in Qt (IDE and GUI) but all the time im found problems and now the actual problems is the type "Auto" defined in C++ 11.
Now, i have typing the keyword auto for declare a iterator and in the time of debug the solution, Qt set me a problem:
"auto" changes the meaning in C++ 11; please dont use it.
Somebody can help me?
-
wrote on 23 Mar 2014, 06:55 last edited by
Hi Charlie_Hdz,
Did you add -std=c++11 or -std=gnu++11 in Qt Creator project settings?
C++11 is not activated by default in Qt Creator.
-
wrote on 23 Mar 2014, 07:02 last edited by
Hi Eddy.
I did it and works
I add in .pro of the project CONFIG += c++11 and works.
Thanks you :)
-
wrote on 23 Mar 2014, 09:06 last edited by
Great
Could you mark the thread as [Solved] please?
happy coding
-
Hi,
Just a little trick, when writing a post with pro file content also use the coding tags e.g.
@CONFIG += c++11@
Otherwise it's likely to get misinterpreted by the current text engine used. Your's look like CONFIG = c+11 even if it's written correctly.
-
wrote on 24 Mar 2014, 00:04 last edited by
Thank you very much SGaist and Eddy i solved the problem; now if dont is to much trouble for you all, you can help me in the next link:
http://qt-project.org/forums/viewthread/40130/
I have Qt to Linux and Windows and the both case i have too much troubles about complier and debugger.
The next problem is about the watch of local variables in debug mode.
The debugger only show me a changed value, for example:
i declare a unsigned long long and i expect a value in the watch such:
00000001-00000002
but the debugger only show :
2
What should i need do?
4/6