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
 Feature Requests
 User macros in additional include directories
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

steinsomers
Ketchup Master

Belgium
65 Posts

Posted - Jan 11 2008 :  04:12:57 AM  Show Profile  Reply with Quote
Since turning off intellisense, a missing link in VA appeared. The features seem to suggest it should understand Additional Include Directories even if specified in property sheets. But it doesn't recognize the value in my property sheet, probably because the path contains user macro's.

So VA doesn't find headers on its own: the "defines" box is empty and the Go! button powerless when on an #include directive, and symbols aren't recognized. Only if I open the header explicitly, for instance using the right-click menu item `Open Document "xyz.h"` on a #include directive, VA starts recognizing the symbols in the header.

In any case, if I set the literal path directly on one project, VA does find the headers. If I set the path containing a user macro, VA doesn't. It should understand the specified directories the way the IDE does.

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Jan 14 2008 :  2:06:21 PM  Show Profile  Reply with Quote
Which version of VA are you using? According to our system this was fixed back in VA 1535.

It is possible you are doing something slightly different, so the fix does not work for you.

Have you rebooted the machine since setting the environment variable? I have often had to do this myself, despite people assuring me it is not required.

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

steinsomers
Ketchup Master

Belgium
65 Posts

Posted - Jan 16 2008 :  12:24:44 PM  Show Profile  Reply with Quote
I'm using VA 1624. There are no environment variable in the picture here. In any case, no settings or projects were changed for months; I only shut off Intellisense (and cleared and rebuilt VA's symbol database).

User macro's are defined in property sheets and look like the built-in SolutionDir or ConfigurationName
macro's. You can refer to them in other property sheets or directly in project settings. So I have a single "Additional Include Directories" setting defined in a property sheet shared by all configurations of all projects.

If the "Additional Include Directories" entry is $(SolutionDir)on\\to\\the\\right\\folder, both the IDE and VA know where to find headers.

If the "Additional Include Directories" entry is $(MyRelativeSolutionDir)on\\to\\the\\right\\folder, and you define user macro MyRelativeSolutionDir in a property sheet in each configuration of each project, then the IDE and Intellisense still know where to find headers but VA drops out.

PS this is not a big deal to me at all

Edited by - steinsomers on Jan 16 2008 3:33:29 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Jan 17 2008 :  6:16:01 PM  Show Profile  Reply with Quote
Using VS2005 and VA 1624 I have setup a test for this, and it works perfectly for me.

I have added a property page, and added a macro called "PROPERTY_SHEET_INC_DIR"

Into the projects C++ additional include directories field I have added:

$(PROPERTY_SHEET_INC_DIR);$(PROPERTY_SHEET_INC_DIR)\\something\\hidden\\inside

and into a cpp file I have added:

#include "property_sheet1.h"
#include "prop_sub_dir1.h"

the first header file is in the directory $(PROPERTY_SHEET_INC_DIR)
while the second header file is in the directory $(PROPERTY_SHEET_INC_DIR)\\something\\hidden\\inside

I did restart the IDE after making the changes to the additional include directories, to make sure VA would catch up with the changes.

Both file names were suggested as I typed the #include lines.
If I use alt-g on either file name, I am taken to the correct file.

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

steinsomers
Ketchup Master

Belgium
65 Posts

Posted - Jan 24 2008 :  12:48:13 PM  Show Profile  Reply with Quote
You're quite right. User macro's are supported. One week has passed and I tried in vain to implant all kinds of other complexities into a simple sample project. I could sometimes get VA to not recognize a class, but touching anything but the Go! button would snap VA out of it. VA even notices almost instantly when you sneakily rename a folder such that appears in the include directories of a project.

BTW I noticed that Visual Studio 2005 bluntly doesn't allow adding a property sheet when the .ncb is read-only as in How do I disable the IDE's intellisense in VS2005.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Jan 24 2008 :  5:21:24 PM  Show Profile  Reply with Quote
You could try renaming the dll. I am not sure how that will impact property sheets though.

Personally I have no real experience with property sheets, so I cannot really guide you on their use.

zen is the art of being at one with the two'ness
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