Workspace properties
- From: "John A. Byerly" <jbyerly_REMOVE@xxxxxxxxxxxxxxx>
- Date: Thu, 10 May 2007 16:29:04 GMT
Hi,
I am currently using Visual Studio 6.0. One of the more frustrating things
about VS 6.0 is the handling of include paths. Example:
Fred has the following folder arrangement on his machine:
Dev\
Common\
File\
Utility\
Base\
DisplayModule\
Storage\
Engine\
Sally, however, uses a flat structure:
Development\
File\
Utility\
DisplayModule\
Storage\
Engine\
Now, assume that DisplayModule\Panel.cpp contains the following line:
#include <Utility/Trig.h>
There are a couple of ways to get this to resolve correctly. One way is to
put "../" in the Additional Include Paths in the project settings. However,
that will work on Sally's machine, but not on Fred's (he needs
"../../Common"). The other way is to use Tools->Options (Directories) and
set an include directory. If both Sally and Fred do this, the file compiles
without any problem.
So, what is my beef? Where do I start?
What if Sally needs to create a branch to work on a super-secret, mind-meld
interface? She might copy her source code as follows:
Development\MindMeldOption\
File\
Utility\
DisplayModule\
BrainReader\
Storage\
Engine\
Then, she sets up a workspace for the branch, adds the .DSP files, and
builds. Everything builds just fine, and she happily makes her changes to
implement the super-secret, mind-meld interface. Except that when she
changes the parameter list in one of the functions, she is greeted with
compiler errors! Why? Because the Tools->Options (Directories) is still
pointing to her old development directory. So, she changes the
Tools->Options (Directories) entry and everything compiles. Great! Except
that while she is still working on this new feature, Fred informs her that a
customer complained about a bug. No problem. Sally goes back to her old
workspace and builds. Compiler errors????!! I didn't even change
anything!!! Oh, I have to change Tools-Options (Directories) again!
Heaven help Sally if she has to work in more than one branch!
I have tried to solve this problem using environment variables. This seems
to work reasonably well, except I have been hit with a new problem. Every
time I launch the application from the IDE, I get "One or more files is out
of date". This happens every time I launch, even after I click "Yes" to
rebuild. I suspect that it is choking on my environment variable (since
this never happened to me until I start using them). Probably because
Windows (DOS) uses %Env% to expand environment variables and VS 6.0 uses
$(Env). It does launch after I click "Yes" to rebuild (after a quick link),
but when I launch again, that dialog pops up again, even when I have not
made any changes.
Sorry for the diatribe! But I needed to set the groundwork for my
questions:
1) Has anyone found a better workaround for the situation I described above?
2) Do more recent versions of Visual Studio fix this deficiency,
particularly by storing include (and library) paths in the workspace and not
globally?
Thanks for any help!
JAB
.
- Follow-Ups:
- Re: Workspace properties
- From: David Ching
- Re: Workspace properties
- Prev by Date: SetUnhandledExceptionFilter doesn't catch exceptions in TimerProc
- Next by Date: Re: Application crashes when closed
- Previous by thread: SetUnhandledExceptionFilter doesn't catch exceptions in TimerProc
- Next by thread: Re: Workspace properties
- Index(es):
Relevant Pages
|