Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "could not be resolved" errors, but Go To Definition works!
"could not be resolved" errors, but Go To Definition works! [message #1764002] Tue, 23 May 2017 20:52 Go to next message
Andrew Voelkel is currently offline Andrew VoelkelFriend
Messages: 16
Registered: September 2016
Junior Member
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 #1764005 is a reply to message #1764002] Tue, 23 May 2017 20:59 Go to previous messageGo to next message
Andrew Voelkel is currently offline Andrew VoelkelFriend
Messages: 16
Registered: September 2016
Junior Member
I just discovered that the errors are all symbol resolutions errors of the code analyzer. This maybe explains why Go To Definition works - it isn't part of the code analyzer.

Is the code analyzer maybe just not that good?
Re: "could not be resolved" errors, but Go To Definition works! [message #1764770 is a reply to message #1764005] Fri, 02 June 2017 07:55 Go to previous messageGo to next message
David Saunders is currently offline David SaundersFriend
Messages: 5
Registered: June 2017
Junior Member
Hi Andy,

I have been using Eclipse for 2 days now, so be aware of my advice :+) I had the same problems, and eventually managed to figure them out.

Are you aware of setting the compiler options in 2 places?

Hopefully you have already set Properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Dialect to -std=c++14 or whatever.

To get the Indexer to work, one has to:

Select Window->Properties -> C/C++ General -> Preprocessor Include Paths, Marcos etc. -> Providers Tab
then select your compiler: CDT GCC Built-in Compiler Settings
In Command to get compiler options text box , put -std=c++1z or whatever at the end of what is there already, other compiler options can be added here too.

So all this enables the Indexer to correctly diagnose syntax problems and display them in the code window. In this case it should hopefully take away all the misdiagnosed problems.

Regards :+)
Re: "could not be resolved" errors, but Go To Definition works! [message #1784934 is a reply to message #1764770] Fri, 06 April 2018 05:13 Go to previous message
Emin Kulturel is currently offline Emin KulturelFriend
Messages: 1
Registered: April 2018
Junior Member
Thanks David,

It resolved my problem..
Previous Topic:Debugger not starting properly (C++ /Eclipse Remote system)
Next Topic:Reading USB with C++
Goto Forum:
  


Current Time: Wed Nov 14 17:12:31 GMT 2018

Powered by FUDForum. Page generated in 0.02282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top