[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.cdt] Adding a Preprocessor Definition

I thought I was able to add a "symbol" or definition to the project properties so that if I have something like:

#ifdef FOO_DEFINED
	#include <somefile.h>
#endif

all the code above would be active and indexed. But after adding the define in several locations the code is still marked as inactive.

Long Version:
I am trying to use CDT with nmake files to compile my code with the MS cl.exe compiler. I have CMake generating the necessary nmake files and I actually have the compile working. At issue is the fact that the "Built In" values are all GCC related. Like everyone else I have preprocessor code like the following:


#ifdef _MSC_VER

#else

#endif

The problem is obviously that _MSC_VER is only defined when compiling. I was thinking that if I added a definition for _MSC_VER to the properties of the project then the code that is being marked as inactive would now be marked as "active" and get indexed. Is this possible?

CDT 6.0/ Windows XP/ Visual Studio Express 8.0/sp1

Thanks
Mike Jackson