Macro definition problem [message #699065] |
Wed, 20 July 2011 18:50 |
Nathaniel Mishkin 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?
|
|
|
Powered by
FUDForum. Page generated in 0.02849 seconds