Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA X not recognising pre-processor switches
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sandylobban
New Member

United Kingdom
2 Posts

Posted - Jan 19 2011 :  06:40:44 AM  Show Profile  Reply with Quote
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?

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jan 19 2011 :  11:51:06 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

sandylobban
New Member

United Kingdom
2 Posts

Posted - Jan 20 2011 :  05:50:02 AM  Show Profile  Reply with Quote
Brilliant. Nice one feline. Working nicely now.

thanks alot.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000