2

https://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.

2 Answers 2

1

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

0

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.

1
  • -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 May 30, 2016 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .