|
Re: C++11 in Eclipse Mars.1 [message #1712778 is a reply to message #1712737] |
Wed, 28 October 2015 08:33 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
When you post questions here, it's really helpful if you are more specific about your situation. For instance, you never mentioned how the project is structured in Eclipse. Is it a managed project (Eclipse builds the make files)? There are a host of things you could have done and I can only guess what it is you are experiencing let alone what build errors you are seeing.
Anyway, I tried it and it builds just fine. I'm using linux and GCC though and, since this is a C++11 feature, I had to enable the C++11 dialect. The syntax coloring doesn't like std::unique_ptr for some reason and keeps displaying it in red underline and even gets confused about things that follow it (like std::endl). But it's not accompanied with any error flags. Likely a minor bug. If that's all you're seeing you can safely ignore it.
If you are using managed builds and the compiler is GCC, you can enable C++11 in the Project ==> Properties ==> C/C++ Build ==> Settings and selecting the compiler ==> dialect then specify the dialect (C++11 in this case) with the drop down box labelled Language Standard
You have visual studio files in your zip. If you are actually using VS and/or the MS compiler then you should read
this: http://stackoverflow.com/questions/19857263/how-to-activate-c11-standard-in-visual-studio-2010
and this: https://www.eclipse.org/forums/index.php/t/174655/ if you are trying to get Eclipse to build using cl.exe etc.
[Updated on: Wed, 28 October 2015 08:59] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25123 seconds