Workspace properties

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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



.



Relevant Pages

  • RE: MFC App with ATL Interface that does not Import
    ... My apologies for any confusion. ... First, I'm using Visual Studio 2005, in Visual C++, and running on WinXP-SP2. ... The AppA compiles fine. ... I also tried another test MFC EXE app, ...
    (microsoft.public.vc.atl)
  • Re: So, hows D2007?
    ... If it ever stops being cheaper and more convenient, ... Service packs for Visual Studio are even more telling. ... VS2003 SP1 issued THREE YEARS after launch. ... Also introduced the 2005 Team editions and changed subscriptions palns ...
    (borland.public.delphi.non-technical)
  • MFC App with ATL Interface that does not Import
    ... First, I'm using Visual Studio 2005, in Visual C++, and running on WinXP-SP2. ... The AppA compiles fine. ... I also tried another test MFC EXE app, ... It also compiled fine in VS2003 and imported fine within my TestApp. ...
    (microsoft.public.vc.atl)
  • Re: VC++ 6.0, does not run with properly under Vista
    ... XP and Vista - if compiled in Visual Studio 2005. ... I also use to launch MS Office applications and also Visual Studio, ... another application by means of the ShellExecuteEx() call. ...
    (microsoft.public.vc.language)
  • Re: I dont really understand windows security...I need help
    ... I would chalk this one up to having a beta version of Visual Studio and let ... however the fix ... It definitely seems like a problem with permissions. ... >>> desktop, but will launch off the quick launch, but only in something ...
    (microsoft.public.dotnet.framework.aspnet.security)