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
 defining __GNUC__ e.g.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mschmidl
New Member

2 Posts

Posted - Apr 24 2010 :  09:36:20 AM  Show Profile  Reply with Quote
I use VisualStudio plus VisualAssist a lot to analyze "foreign" code as well as to write code for other platform (e.g. AVR-GCC).

Within these environments the gcc compiler defines e.g. __GNUC__ automatically. So within the source code the

#ifdef __GNUC__
...
#endif

is used a lot. Because the definition is done by the compiler and nowhere in the code files, VisualAssist assumes it is not defined.

Question: how can I get such a define to the attention of VisualAssist? I tried to modify the StdAfx.h file located in the "VisusalAssistX/Misc" directory adding a "#define __GNUC__" but it does not help.

Any other idea?

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 26 2010 :  04:14:07 AM  Show Profile  Reply with Quote
Visual Assist parses both active and inactive code so you can work with them with any configuration.

If you experience grayed out code, it is done by Visual Studio and you can turn it off here:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Colorize inactive code blocks in a different color

or you can add the define to the macros in project settings.
Go to Top of Page

mschmidl
New Member

2 Posts

Posted - Apr 26 2010 :  05:29:34 AM  Show Profile  Reply with Quote
to set the define in the project settings solves it. Thanks a lot.

Now I can use the colorize mode as expected.
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