Reputation: 1614
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.
Upvotes: 2
Views: 6101
Reputation: 21
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.
Upvotes: 1
Reputation: 1374
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.
Upvotes: 5
Reputation: 591
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.
Upvotes: 1