C++ – Eclipse c++ Type could not be resolved error even though build is successful

ceclipse

I have mixed C++ / Java project in Eclipse. I've setup a build.mk file and Eclipse builds project successfully when all files in editor are closed. When I open a .h or a .cpp file Eclipse finds a lot of undefined symbols in them. I have references to 3rd party API and all the problems seem to be related to symbols from that API. Strangely, some types are considered defined in Eclipse, and some are considered undefined even though in some cases they are defined in the same .h file.

My colleague is not experiencing any of these problems, but we are clueless where to start solving this problem. We already made sure that our Eclipse include directories are the same. Is there some way to compare eclipse project settings?

Update: .cproject files and .project files and files in .settings directory know differ only by some paths. Did not help to solve my problem though.

Best Answer

I had the same problem. It could be resolved by flushing the Eclipse indexer.

I used the projects context menu and selected Index->Rebuild and Index->Freshen All Files. The last removed the error messages.