Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 "Add include" with quotes or brackets (C++)

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
uweph Posted - Apr 27 2019 : 06:32:25 AM
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.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 06 2019 : 08:04:45 AM
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.
uweph Posted - May 03 2019 : 09:42:47 AM
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.
feline Posted - Apr 27 2019 : 06:51:48 AM
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?

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