Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:22 Go to next message
Kevin Wooley is currently offline Kevin WooleyFriend
Messages: 4
Registered: January 2014
Junior Member
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 12:23 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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"


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Indexer cannot find symbols in local header files [message #1239648 is a reply to message #1239542] Tue, 04 February 2014 17:42 Go to previous messageGo to next message
Kevin Wooley is currently offline Kevin WooleyFriend
Messages: 4
Registered: January 2014
Junior Member
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 09:57 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Indexer cannot find symbols in local header files [message #1263890 is a reply to message #1239906] Tue, 04 March 2014 21:29 Go to previous messageGo to next message
Kevin Wooley is currently offline Kevin WooleyFriend
Messages: 4
Registered: January 2014
Junior Member
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 08:30 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny ShifrinFriend
Messages: 208
Registered: July 2009
Senior Member
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 22:53 Go to previous messageGo to next message
Kevin Wooley is currently offline Kevin WooleyFriend
Messages: 4
Registered: January 2014
Junior Member
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 06:51 Go to previous message
Yevgeny Shifrin is currently offline Yevgeny ShifrinFriend
Messages: 208
Registered: July 2009
Senior Member
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: Fri Apr 26 04:27:32 GMT 2024

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

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

Back to the top