Author |
Topic |
|
uweph
Junior Member
14 Posts |
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. |
|
feline
Whole Tomato Software
United Kingdom
19025 Posts |
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? |
zen is the art of being at one with the two'ness |
|
|
uweph
Junior Member
14 Posts |
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
Whole Tomato Software
United Kingdom
19025 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|