"could not be resolved" errors, but Go To Definition works! [message #1764002] |
Tue, 23 May 2017 16:52  |
Eclipse User |
|
|
|
I've created a makefile project from Nordic example code. Since this is a makefile project from a known source, I'm not getting build errors. I've also set up indexing properly AFAIK, having double checked many things (and see below).
But I'm getting errors in the Problems windows and red lines in the editor, stemming from numerous "could not be resolved" occurrences. The weird thing is when I click on one of the offending items (often just a simple #define constant), the IDE dutifully takes me to the definition. So one part of Eclipse understands what is going on and is resolving symbols, but another part of Eclipse does not. And none of this has anything to do with build errors, because the make based build runs with no errors.
How in tarnation do I figure out what is going on here?
- Andy
|
|
|
|
|
|
|
|
|
|
|
|
Re: "could not be resolved" errors, but Go To Definition works! [message #1863100 is a reply to message #1862855] |
Tue, 16 January 2024 04:35   |
Eclipse User |
|
|
|
The problem stems from Eclipse not properly indexing the Makefile itself, which means it can't correctly resolve symbols that are defined in the Makefile.
To resolve this issue, you can try the following steps:
Rebuild the Index: Eclipse periodically rebuilds its index in the background. To force a rebuild, go to Project > Clean > Clean Project.
Incremental builds can help Eclipse keep the index up-to-date with changes made to the project. To enable incremental builds, go to Project > Properties > Build Automatically and check the Enable Incremental Build checkbox.
If the previous steps don't work, you can manually update the index for the Makefile file. Right-click on the Makefile file and select Refresh.
If none of the above steps work, you can try clearing the index and reindexing the project. To do this, go to Project > Clean > Clean Project and then select Clean index. This will remove the current index and force Eclipse to rebuild it from scratch.
After following these steps, the indexing issue should be resolved, and the "could not be resolved" errors should disappear.
|
|
|
|
Powered by
FUDForum. Page generated in 0.05055 seconds