2

I created a static library which i'm including in another C++ eclipse cdt project. Everything is compiled correctly once i change the build settings accordingly, but the editor still doesn't recognize the types which were declared in the static library, marking many red squiggly marks, etc.

Is there any way to make the eclipse editor search in the same places as the compiler? It is a very big visual nuisance to say the least.

2
  • Not intimately familiar with Eclipse, but are you including the header files and making sure the path to them is either relative, or included in Eclipses' include path? Commented Jan 31, 2012 at 7:31
  • I am including the header files - as least the build tool chain. As i said - the project compiles without any problem, the problem is only for the editor. Regardless, the static library itself is also an eclipse project. Commented Jan 31, 2012 at 7:40

3 Answers 3

5

I had a rather similar problem. The problem was that in a project, whenever I included a standard library, stdio.h for example, eclipse did not recognize any of the functions and macros defined there or could recognize some of them. To solve the problem, all I needed to do was to refresh the indexer. In order to refresh the indexer, right click on the project and select indexer->rebuild.

Sign up to request clarification or add additional context in comments.

Comments

1

Make sure the path to the library's header files (.h) are listed in the project.

Right click on the project -> properties -> C/C++ General -> Paths and Symbols -> Includes -> GNU C++ -> Add the path to where your header files are if not listed.

also try refreshing the indexer: right click on project ->indexer -> click all the options under that menu.

Comments

1

I also had this problem. For me it was solved by changing the indexer settings like Daniel Ogburn said.

You should check the section "Build configuration for the indexer". It was set to "Use fixed build configuration" , which was not my active configuration. So it didn't contain the correct includes for the library.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.