Too many relative include directories in VC2003?

  • Thread starter Thread starter Andreas Busse
  • Start date Start date
A

Andreas Busse

Hi,

I received a big fat package of source code developed with Metrowerks
CodeWarrior and now I am trying to convert this project to VC.NET
2003. My problem is, that in order to compile I have to add around 70
additional include directories to the project's compiler settings.
Each of these paths is between 40 and 100 characters long (after
expansion of the $(ProjectDir) macro). So when I specify these path
entries using relative paths and the $(ProjectDir) macro, neither the
IDE nor the compiler recognizes all of them. If I specifiy them in
absolute paths, compiler and IDE behave well.

What can I do to avoid absolute paths? I have already tried setting an
environment variable and specifying the paths relative to it, i.e.
$(ENVVAR)\dir1;$(ENVVAR)\dir2...;$(ENVVAR)\dirN

any help appreciated,
Andreas
 
How about mapping absolute path by "subst" command coming with OS.

E:\Documents and Settings\Onega>subst /?
Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1: Specifies a virtual drive to which you want to assign a
path.
[drive2:]path Specifies a physical drive and path you want to assign to
a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

Best Regards
Onega
www.fruitfruit.com
 
Onega said:
How about mapping absolute path by "subst" command coming with OS.
Well, this would actually be the last option I would choose. However,
it's an option and thank you very much for this workaround.

kind regards,
Andreas
 
Andreas Busse said:
Hi,

I received a big fat package of source code developed with Metrowerks
CodeWarrior and now I am trying to convert this project to VC.NET
2003. My problem is, that in order to compile I have to add around 70
additional include directories to the project's compiler settings.

Ouch.
The CW guys consider it a feature that
CW does look into the include paths
recursively. I do consider it as a bug.
[...]
What can I do to avoid absolute paths? [...]

I know it hurts, but did you already
consider changing the files? Actually
this shouldn't be too hard, since the
way CW handles this, there shouldn't
be two files with the same name. So
you should be able to simply replace
#include "x.h"
by
#include "y/x.h"
in the whole project.
And if you really make a mistake, the
compiler will catch it for you.

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 
Back
Top