T O P I C R E V I E W |
sandylobban |
Posted - Jan 19 2011 : 06:40:44 AM Hi, we have some pre processor switches set up in a config header file like so...
//config.h #ifdef _PLATFORM #define ENABLE_BOO 0 #define ENABLE_UTILS 1 #define ENABLE_LENS_FLARE 0 #define ENABLE_AUDIO 1
#else
#define ENABLE_BOO 0 #define ENABLE_UTILS 0 #define ENABLE_LENS_FLARE 0 #define ENABLE_AUDIO 0
#endif
When we include this header file into audio.cpp, and use for example...
#if ENABLE AUDIO
....some audio code
#endif
All of the code within this pre processor command is greyed out and greyed out anywhere that these preprocessor definitions are used in the code base. I have tried adding the PLATFORM and ENABLE_AUDIO preprocessor definitions to Project > Properties > Config properties > NMake > Preprocessor Definitions list.
That doesnt work. It looks like a bug of sorts in not picking up the pre procesoor def. Any ideas how to stop the code greying out? Visual assist still works with suggestions if I start typing and stuff within this greyed out code, but its not the best to read.
Any ideas, work arounds or fixes? |
2 L A T E S T R E P L I E S (Newest First) |
sandylobban |
Posted - Jan 20 2011 : 05:50:02 AM Brilliant. Nice one feline. Working nicely now.
thanks alot. |
feline |
Posted - Jan 19 2011 : 11:51:06 AM VA does not attempt to show inactive code in a different colour, this is coming from the IDE its self:
IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Colorize inactive code blocks in a different color
I have also seen this problem myself, sometimes the IDE can get confused and show active code as if it was inactive. Turning off the IDE option will stop this from happening. |
|
|