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
 extra "includes" parsed
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

dim0n
New Member

6 Posts

Posted - Nov 18 2004 :  3:17:14 PM  Show Profile
I have the following include section in my header file

#if defined(XBOX)
#  if defined(DEBUG_UNOPT)
#    include "XBOX/XBOX_DEBUG_UNOPT.h"
#  elif defined(DEBUG_OPT)
#    include "XBOX/XBOX_DEBUG_OPT.h"
#  elif defined(CLEAN_OPT)
#    include "XBOX/XBOX_CLEAN_OPT.h"
#  endif
#elif defined(PS2)
#  if defined(DEBUG_UNOPT)
#    include "PS2/PS2_DEBUG_UNOPT.h"
#  elif defined(DEBUG_OPT)
#    include "PS2/PS2_DEBUG_OPT.h"
#  elif defined(CLEAN_OPT)
#    include "PS2/PS2_CLEAN_OPT.h"
#  endif
#elif defined(XENON)
#  if defined(DEBUG_UNOPT)
#    include "XENON/XENON_DEBUG_UNOPT.h"
#  elif defined(DEBUG_OPT)
#    include "XENON/XENON_DEBUG_OPT.h"
#  elif defined(CLEAN_OPT)
#    include "XENON/XENON_CLEAN_OPT.h"
#  endif
#endif

and VA parses all these files and shows definitions from all of them. How can I get rid of that?


I added

#define XBOX
#define DEBUG_UNOPT

to my StdafxVa.h file and I expected VA to stop prasing those extra files but it still parses them (Yes, I rebuilt database). Is there any known way I can solve this problem?

Thanks,
dim0n

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Nov 18 2004 :  4:27:50 PM  Show Profile
you cannot fix this with #defines, since VAX will always parse all of the code, and offer suggestions for all of it.

the general explanation of why is that you often type code inside both halves of a:

#ifdef _MODE1_
    // some code in here
#else
    // some more code in here
#endif


block. the other half of the reason is that VAX isn't the compiler, and doesn't have access to all of the relevant #define's, so it cannot reliably know which sections to include, and which sections to exclude.

if you know you only want to use VAX with one combination of these headers, you could try moving the other headers into a sub-directory that the IDE, and thus VAX does not know about, so that VAX wont scan them. however, i suspect this isn't really going to be an option for you.

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

dim0n
New Member

6 Posts

Posted - Nov 18 2004 :  5:04:34 PM  Show Profile
Thanks a lot for good and clear explanation. Yeah, you're right it's not an option for me, I can't move files within 3rd party library. I will mess with that as I get used to.

VA gives me 2(?!) definitions of one symbol per header... plus 2(?!) per source file... times 9... and... I have 36 definitions of every symbol when I press Alt-G ;) Moreover, these files are HUGE and pressing Alt-G is painful. It takes about 4-6 seconds to show this huge list.

'll keep fightin' ;)

Dmitry
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Nov 18 2004 :  5:11:31 PM  Show Profile
feline's assessment is correct. Behavior is by design.

VA X doesn't know which code you are working on at any one time, so it parses code from all the headers. Though you might not do this yourself, it's quite common to write code for multiple "versions" at the same time, working in one #ifdef'd block of code then jumping to similar code for another platform.

If you use the "platform" feature of the IDE, you can specify directory paths in the IDE for each platform. VA X respects this setup, finding definitions relevant only to the current platform.

If you use platforms and want to know more, read the section titled, "Support for Multiple Platforms" in:
www.wholetomato.com/products/features/directories.html?more=yes
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000