Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Add include generates relative paths

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
tangens Posted - Nov 10 2011 : 08:03:46 AM
We work with a project directory structure that contains quite some (sub)folders.
When making use of the Add include functionality, the include that is added always contains a relative path.

Consider following directory structure:
project\\package1\\class1.h
project\\package1\\implementation\\class1.cpp
project\\package2\\class2.h
project\\package2\\implementation\\class2.cpp

when doing a Add include for Class1 and Class2 in class1.cpp,
the following include statements are generated:
#include "..\\class1.h"
#include "..\\..\\package2\\class2.h"

What we would like to have is the following:
#include "package1\\class1.h"
#include "package2\\class2.h"

as we have a a INCLUDEPATH which is set to the root of our project.

Is there anyway to force VAX to generate the includes in this fashion?

Bart
10   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Dec 16 2011 : 2:31:36 PM
In build 1862 and higher, you can change the default behavior of preferring the shortest possible string for use in generated #include directive paths. There is a new binary registry value named AddIncludePreferShortestRelativePath. It defaults to 01. Change to 00 to to give preference to non ..\\ dirs.
support Posted - Dec 16 2011 : 2:12:48 PM
case=62702 is fixed in build 1862
sean Posted - Nov 17 2011 : 10:04:37 AM
Great!

In the test solution that we built, adding "." fixed the include of class2.h but the include of class1.h still used a relative path (..\\class1.h) since it was shorter than "package1\\class1.h". The next build will give you the option of overriding the bias towards shorter paths that use ".." (when possible, given the include directories).
tangens Posted - Nov 17 2011 : 03:59:55 AM
we didn't have that...

I just added . as value for Include Search Path and the includes are generated correctly!

Thanks a lot!!
sean Posted - Nov 16 2011 : 12:36:42 PM
Have you added .\\ (or the full project root directory) to Project | Properties | Configuration Properties | NMake | Include Search path?
tangens Posted - Nov 16 2011 : 11:53:19 AM
we have some (old) custom make system...
So the /I parameters are then eventuall passed to the cl throught this make system.
Our makesystem is triggered by using in VisualStudio the project type Makefile.

In the NMake Configuration Properties we then specify following properties:
Build Command Line: makeit.cmd build Debug
Rebuild All Command Line: makeit.cmd rebuild Debug
Clean Command Line: makeid.cmd clean Debug

So what we would need is something in VAX where we can configure these include paths ourselves... (something like the stable includes or so...)
sean Posted - Nov 14 2011 : 9:18:03 PM
where is your INCLUDEPATH defined?
accord Posted - Nov 14 2011 : 8:32:01 PM
I was able to create a test project where I am seeing the same effect as you:

case=62702

Thank you for the clear description.
tangens Posted - Nov 14 2011 : 04:05:16 AM
system info:
VA_X.dll file version 10.6.1859.0 built 2011.10.02
DevEnv.exe version 10.0.40219.1 Professional
msenv.dll version 10.0.40219.1
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
4 processors (x86-64;WOW64)

I must say we have this issue for quite a while already..
accord Posted - Nov 10 2011 : 3:23:45 PM
Which Visual Assist version are you using? We had fixed a similar bug in 1854. From the history:
quote:

Fixed Add Include when root directory is specified as an additional include directory. (case=58426)


http://www.wholetomato.com/support/history.asp

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