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
 "Add include" with quotes or brackets (C++)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

uweph
Junior Member

14 Posts

Posted - Apr 27 2019 :  06:32:25 AM  Show Profile  Reply with Quote
The "Add include" command should use brackets <�> for the header file if the header is in one of the INCLUDE or /I folders and not in the local project folder.

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Apr 27 2019 :  06:51:48 AM  Show Profile  Reply with Quote
What do you have the VA setting:

VA Options -> Code Generation -> Add Include style:

set to? Is this "Context dependent (Default)" or some other setting?

If this is set to default, do you always have this problem, or does it only happen some of the time? Which IDE and version of VA are you using?

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

uweph
Junior Member

14 Posts

Posted - May 03 2019 :  09:42:47 AM  Show Profile  Reply with Quote
I'm using VA 10.9.2302.0
And yes, it's the "Context dependent (Default)" setting.

C++ documentation says that <> looks in /I compiler option and the INCLUDE environment variable.
"" first looks in local directory, then in the same as <>

So:
If a header is not found locally but in the /I paths, it should use the <> form.
Otherwise, if, in future, I have by accident a header with the same name, the compiler would switch to this one.

VA with the "Context dependet (Default)" setting, always uses the "" form if the header is not a Win API file.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - May 06 2019 :  08:04:45 AM  Show Profile  Reply with Quote
It depends on your solution settings, on how the include directories to search have been set and specified. When I use Add Include on a Boost header, with VA set to Context Dependent, then I get a #include <> line, even though Boost is not part of the Win API.

Which IDE are you using?

Are you using a normal C++ Solution and Project structure? Or are you opening something else?

If you are using C++ project, can you check and see if you have the include directories that you want VA to treat as system includes included via:

Project properties -> C/C++ -> General -> Additional Include Directories

or

Project properties -> VC++ Directories -> Include Directories

VA treats these differently, and I am guessing you have your directories included via the second, "VC++ Directories" setting. Moving the settings to the first, the "C/C++ -> General" should produce the desired behaviour from Add Include.

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