Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Macro definition problem
Macro definition problem [message #699065] Wed, 20 July 2011 18:50
Nathaniel Mishkin is currently offline Nathaniel MishkinFriend
Messages: 3
Registered: July 2009
Junior Member
I imported an existing non-CDT C++ project into Eclipse ("Makefile Project with Existing Code"). I've set up Includes and Symbols definitions and things mostly seem to work, at least as far as viewing code, but at least one of my .h file has the problem that the CDT/editor seems to think that preprocessor symbol that's being used to guard against multiple inclusion is already defined. I.e., the .h file looks something like:

#ifndef _FOO_H_
#define _FOO_H_
...
#endif


and all the lines show as "greyed out" (i.e., not active). The .cpp file that includes that .h file shows errors (presumably) because the .h file's contents are not being used. If I replace the .cpp file's #include of the .h file with the actual contents of the .h file, everything shows clean in the .cpp file.

This problem does not occur with all of my .h files, all of which are using the same multiple inclusion sort of guard. Somehow, for this one .h file, it's as if the CDT thinks the guard variable is defined, although I don't see why.

Any ideas?
Previous Topic:[solved]How to call Boost thread library?
Next Topic:CDT Parsers as Standalone
Goto Forum:
  


Current Time: Thu Apr 25 05:47:26 GMT 2024

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

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

Back to the top