I am trying to create a C ++ application on Windows using Qt.
My setup:
- Installed Vs2008,2010,2012
- Installed Qt 5 RC1
Now when I #include and try to use std :: unique_ptr, it tells me that it is not defined, so I looked in the VS2010 headers and saw that _HAS_CPP0X needs to be defined, so I added it to .pro as DEFINES + = _HAS_CPP0X
It still didn't affect, so I pressed Ctrl + clicked #include memory to find it using the memory header:
C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ include
Actually there is no std :: unique_ptr!
Of course, he should look at:
C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ VC \ include?
I decided that I would include the memory through the full path, but this still fails with errors in the included memory header related to C ++ 11 things, such as move links and rvalue.
So I would like to know:
- Can Qt on Windows use the C ++ 11 features supported by Vs2010?
- If so, how?
- If not, then I am very disappointed that developing a cross-platform Qt 5 application on Linux means it is not a cross platform, since it is impossible to build it for any other platforms!
Edit:
Just such a clear solution: download the Qt5 source and create it using MinGW, and everything will be ready (including the C ++ 11 pro option in the accepted answer).
paulm source share