Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer cannot find symbols in local header files
Indexer cannot find symbols in local header files [message #1237455] Wed, 29 January 2014 14:22 Go to next message
Eclipse UserFriend
index.php/fa/17359/0/I've searched around quite a bit but can't find a solution to this one, hopefully someone here has some suggestions!

I'm using Eclipse Juno and created a project from an existing Makefile project. The source directory contains both header files and cpp files, which all show up in the Eclipse project.

However, the code analysis shows many warnings in the .cpp files about being unable to find member declarations for a classes that are defined in the local header files. The include files are found successfully.

The only wrinkle is that my companies convention is to use <..> notation for all header files. I tried changing this to "...", but it still doesn't work.

Any suggestions on what I can do?

Screenshot:
index.php/fa/17359/0/
Re: Indexer cannot find symbols in local header files [message #1239542 is a reply to message #1237455] Tue, 04 February 2014 07:23 Go to previous messageGo to next message
Eclipse UserFriend
You should not use angle brackets <> for local header inclusion. It is recommended to use this syntax only for system/external library headers. For local headers you should always use quotes
e.g. #include "myheader.h"
Re: Indexer cannot find symbols in local header files [message #1239648 is a reply to message #1239542] Tue, 04 February 2014 12:42 Go to previous messageGo to next message
Eclipse UserFriend
I've tried switching to quotes instead of angle brackets for the includes and the symbols still can't be found.

Also, as I mentioned, the use of angle brackets is my company's standard - is there a way to force the indexer to look for headers locally as well, regardless of the syntax?
Re: Indexer cannot find symbols in local header files [message #1239906 is a reply to message #1239648] Wed, 05 February 2014 04:57 Go to previous messageGo to next message
Eclipse UserFriend
If the indexer cannot find the included header then you would see a yellow question mark left of the #include command.
When you select one of the marked methods (e.g. the destructor) and press F3 does Eclipse then say it is ambiguous?
Are there any error markers in the header files?
Re: Indexer cannot find symbols in local header files [message #1263890 is a reply to message #1239906] Tue, 04 March 2014 16:29 Go to previous messageGo to next message
Eclipse UserFriend
The indexer can find the header file just fine. If I select the header file and choose "open declaration" from the right-click menu, the header file is opened.

There are no errors markers in the header file.

When I selec one of the marked methd Eclipse says "Member declaration not found."
Re: Indexer cannot find symbols in local header files [message #1264452 is a reply to message #1263890] Wed, 05 March 2014 03:30 Go to previous messageGo to next message
Eclipse UserFriend
The following might help you understand the problem:
context menu on the file -> Index -> Create Parser Log File
Re: Indexer cannot find symbols in local header files [message #1265280 is a reply to message #1264452] Wed, 05 March 2014 17:53 Go to previous messageGo to next message
Eclipse UserFriend
THANK YOU!

The parser log file showed me that there was an error in an include file which was pulled in by an included header! There was also an unresolved include file, which Eclipse wasn't marking as such (is there some option I need to enable to see these in the "Problems" window?

anyway, thanks again for pointing out the logfile, I'm all up and running now!
Re: Indexer cannot find symbols in local header files [message #1265492 is a reply to message #1265280] Thu, 06 March 2014 01:51 Go to previous message
Eclipse UserFriend
I did not understand what do you want to see in problem view.

I would suggest checking your index statistics. Perform index rebuild on your project and you will see the results in error logs view. You should try to fix the unresolved includes. You can also select your project -> context menu -> search for unresolved includes.
Previous Topic:Remote Debugging - Sending support files to Remote System
Next Topic:"The selection cannot be launched..."
Goto Forum:
  


Current Time: Tue May 13 21:06:35 EDT 2025

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

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

Back to the top