Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Various CDT parser errors
Various CDT parser errors [message #1278582] Thu, 27 March 2014 14:41 Go to next message
melt down is currently offline melt downFriend
Messages: 2
Registered: March 2014
Junior Member
I'm starting to work on an existing project. The current developer doesn't use an IDE, but I'd like to use Eclipse CDT. I've checked out the project from SVN and then used the "Convert to C/C++ Project (Adds C/C++ Nature)" feature to enable the CDT features. The project uses automake/autoconf to setup the build environment. When I do the 'conversion' the project is built and everything looks fine. However, when I begin to open up some of the .c files I get a bunch of different errors highlighted by CDT. Very basic errors like 'symbol can't be resolved', 'undefined type', etc. Keep in mind that everything builds fine so these errors are invalid. I can also manually follow the header files that are included and see the various structures and values defined in them. I also tried this whole thing again (check project out from SVN, add C nature, build project) but I sometimes get slightly different parser errors. That is, the same symbols aren't always highlighted as incorrect. It is almost as if the CDT parser is running out of room to store the symbols in it's indexer or something. This isn't that big of a project (around 40k lines of code). Does anyone have any idea what is going on here? I'd love to use CDT to work on this project.
Re: Various CDT parser errors [message #1281080 is a reply to message #1278582] Mon, 31 March 2014 10:23 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
I guess the indexer is missing some include paths or symbols. Follow the instructions here
https://wiki.eclipse.org/CDT/User/FAQ#Why_does_Open_Declaration_.28F3.29_not_work.3F_.28also_applies_to_other_functions_using_the_indexer.29


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Various CDT parser errors [message #1281274 is a reply to message #1281080] Mon, 31 March 2014 16:36 Go to previous messageGo to next message
melt down is currently offline melt downFriend
Messages: 2
Registered: March 2014
Junior Member
Thank you for the response. I've double-checked the include directories and everything looks OK. I am also able to use the right-click "Open Declaration" feature as well as the Include Browser view to navigate to a header file that contains some definitions that a .c file has tons of markers for errors. Also, some symbols in the header are properly recognized while others aren't. In this particular file, most of the error markers are regarding references to an enumerated type. Various references to #defines and function definitions seem to work fine. Skimming through the Problems view it looks like there are some complaints of structs not being defined either. It looks like it can't recognize any symbol defined as typedef. For example: typedef enum {FIRST, SECOND} myenum; Or typedef struct MYSTRUCT {int id} mystruct; In either of these examples FIRST, SECOND, and mystruct would be marked as errors in .c files that made a reference to those symbols in the header file.

This is what the indexer event info message looks like:

Indexed 'testproject' (62 sources, 701 headers) in 17.11 sec: 108,331 declarations; 119,476 references; 15 unresolved inclusions; 463 syntax errors; 677 unresolved names (0.30%)
Re: Various CDT parser errors [message #1295585 is a reply to message #1281274] Mon, 14 April 2014 11:50 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
You can try the following:
Project->C/C++->Search for unresolved includes
This should give you a list of the 15 unresolved includes.

Are the missing enums, structs defined in these headers? Are the missing enums, structs surrounded by some #ifdef MY_SYMBOL?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:I can't enable Content Assist in Eclipse Kepler
Next Topic:Error parser file path handling
Goto Forum:
  


Current Time: Thu Apr 25 22:09:44 GMT 2024

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

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

Back to the top