简体   繁体   中英

How to enable c++11 in eclipse Luna?

  • I have eclipse Luna.I want to use auto variable in my project and for that i need to enable c++11 in eclipse.I have followed this answer Eclipse CDT C++11/C++0x support
  • But in my project's property, there are no option like c/c++ Build. There are only one option named c/c++ General .
  • So using c/c++ general how can i enable c++11 in my eclipse.Please anybody know the solution then mention steps.thanks.

For Eclipse Luna, go to Project > Properties > C/C++ Build > Settings > Tools Settings > Cross G++ Compiler (or whichever compiler setting you're using) and choose "ISO C++1y (-std=c++1y)" or "ISO C++11 (-std=c++0x)". Or instead, in "Other dialect flags", you can put std=c++11, or std=c++14, but if you do it this way you'll probably have to take an additional step not covered here so the Eclipse editor will produce error flagging for the correct C++ version in the editor.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM