Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support

I come from that website.

I have a C++ project that compiles with g++-4.8 without problems. I just wanted to use std::int8_t from the cstdint file.

Problem is the eclipse indexer can't resolve the name.

I went to the csdint file and in the initial macro it expands __cplusplus to 199711L instead of 201103L.

In my project settings I added std=c++11 and in the compiler flags I addded GXX_EXPERIMENTAL_CXX0X

And did I say it compiles?

It's very frustrating, I suppose I can live without the indexer, but then again what is the purpose of an IDE if it's giving me error false positives.

share|improve this question
up vote 1 down vote accepted

I found my answer in here: http://www.eclipse.org/forums/index.php/t/490066/

Go to Project Properties->Paths and Symbols->Symbols Tab->GNU C++->__cplusplus Symbol and change to 201103L

share|improve this answer

It depends on your used type of C++ project and your eclipse version. I have a Makefile project in Eclipse Mars.2 (4.5) with CDT 8.8.1.201602051005) If you have a Makefile project and see the item C/C++ General-->C/C++ Make Projects in your project properties, you also have to go to the tab "Discovery Options" and add -std=c++11 to the Compiler invocation arguments.

share|improve this answer
    
-stc=c++11 was necessary for compilation, but compilation was not the problem, only the symbols, for this it needed the path to the Symbols in Project Properties->Paths and Symbols->Symbols Tab->GNU C++->__cplusplus Symbol – Claudiordgz May 30 at 17:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.