본문 바로가기

C/C++

Eclise CDT C++11지원

Eclise CDT C++11지원

Kepler에서 syntax error, build error 해결됨을 확인했습니다


UPDATE: It's been a long time since I posted the original answer and it has become outdated. I double-checked today (Mar 15, 2014): in Eclipse Kepler (Build id 20130614-0229) it is sufficient to

  • add under Project > Properties > C/C++ Build > Settings then on the Tool Settings tab GCC C++ Compiler > Miscellaneous the -std=c++11 flag,

  • then under Window > Preferences > C/C++ > Build > Settings on the Discovery tab chose CDT GCC Built-in Compiler Settings and add the -std=c++11 flag to Command to get compiler specs. On my machine it looks like this after the change:

    ${COMMAND} -E -P -v -dD -std=c++11 "${INPUTS}"

  • clean and rebuild both your project and your index (Project > C/C++ Index > Rebuild) as Eclipse tends to cache error messages and show them even though they are gone after changing the settings.

This works on my machine for sure. If it doesn't on yours, then you might want to give a shot to this: C++11 full support on Eclipse although I am neither sure about the correctness of this approach nor was it necessary to do it on my machine. As of March 7, 2014 users claim that it helped them whereas the above approach didn't.

'C/C++' 카테고리의 다른 글

C++11 Stringtokenizer  (0) 2015.01.26
C++11 강제  (0) 2015.01.26
cin 입력 에러 해결법  (0) 2013.10.20
C++ string 정리 (C++ 문자열)  (1) 2013.06.09
아스키코드표 ASCII  (0) 2013.04.06