user3085931
user3085931

Reputation: 1803

Eclipse CDT: nothing could be resolved?

I have a very strange error/bug here:

From one hour to the next, Eclipse isn't able to resolve any of the symbol. E.g.:

std, list, [own objects], or functions like: size(), append(), cout and so on ...

I already rebuild and /refreshed the indexer over the whole project and tried to clean it too. But without any effort. The only thing new I did was yesterday: I added Doxygen support to my project.

I have no idea where this comes from. I think sending all the source code is way too big, it has to be a general Eclips-Error, since I was working like this for weeks.

Eclipse version: Kepler Service Release 2

Has anyone an idea?

UPDATE

Thank you for your Support and pardon me I have switched my whole system, thus I can't reproduce your suggestions anymore.

Upvotes: 2

Views: 293

Answers (2)

vitaut
vitaut

Reputation: 55544

Most likely you have some system-specific include directories missing in your settings which makes it impossible for indexer to correctly parse iostream, thus the errors. Selecting Index -> Search For Unresolved Includes in the context menu of the project will give you the list of unresolved includes which you can search in /usr/include and add containing directories to C++ Include Paths and Symbols in Project Properties.

On my system I had to add /usr/include/c++/4.6/x86_64-linux-gnu for bits/c++config.h to be resolved and a few more directories.

Don't forget to rebuild the index (Index -> Rebuild) after adding include directories.

Upvotes: 1

xiaodong
xiaodong

Reputation: 1012

there are two ways:

  • use system's default lib: when you create the project using "New Project", you can select the "Toolchain for Indexer Setting". For example, I am using Eclipse in Linux so I just choose "Linux GCC". And after the project is created, all the headers will be automatically included for you.
  • use you own version of the lib: you need to tell Eclipse the paths to search for the include. Right click the project name, select "C/C++ General" -> "Paths and Symbols" -> "GNU C++". And you can add your paths there.

Upvotes: 1

Related Questions