Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 defining __GNUC__ e.g.

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mschmidl Posted - Apr 24 2010 : 09:36:20 AM
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?
2   L A T E S T    R E P L I E S    (Newest First)
mschmidl Posted - Apr 26 2010 : 05:29:34 AM
to set the define in the project settings solves it. Thanks a lot.

Now I can use the colorize mode as expected.
accord Posted - Apr 26 2010 : 04:14:07 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000