Hi TBass,
> Is there a way to get Visual Studio 2003 look to one directory for
> debug version dlls when set to DEBUG and then to another directory
[quoted text clipped - 3 lines]
> don't want to keep re-compiling them for debug/release depending on
> whether I'm compiling the current project for debug/release.
What I do in this situation is to output all release modules which I need
together in one release directory and the same for the debug versions. The
intermediate output files of each project go into a sub directory of the
global release/debug directory named like the project.
So I have an output drive which I name X and there you find this file
structure
x:\release
// here I have *.dll, *.lib, *.exe and *.pdb files of release builds
X:\release\Proj1
// all project output of Proj1
X:\release\Proj2
// all project output of Proj1 and so on
X:\debug
// here I have *.dll, *.lib, *.exe and *.pdb files of debug builds
X:\debug\Proj
// Proj1 output and so on
So if you build an exe into the debug directory and run or debug it, it
should already find all debug dlls it needs.
Does that answer your question or do I miss something?
--
SvenC
TBass - 16 Oct 2007 14:14 GMT
[snip]
> So if you build an exe into the debug directory and run or debug it, it
> should already find all debug dlls it needs.
[/snip]
But how does it find the dll in the release or debug directory?
For example, If I'm working on Proj1, and it needs to utilise the dll
mylib.dll, you would set up:
x:\release
-mylib.dll
-mylib.lib
-mylib.exp
-----+\Proj1
-----+----Proj1.exe
x:\debug
-mylib.dll
-mylib.lib
-mylib.exp
-----+\Proj1
-----+----Proj1.exe
But if I run Proj1.exe, won't I get the error "Proj1.exe could not run
because mylib.dll could not be located." ? Will it find it if it's in
the directory above?
You could add the debug and release versions to the paths in the
configuration, but how would you get it to prioritize on the DEBUG
directory in the debug mode and the RELEASE directory in release mode.
I must be missing something.
David Wilkinson - 16 Oct 2007 14:45 GMT
> [snip]
>> So if you build an exe into the debug directory and run or debug it, it
[quoted text clipped - 28 lines]
> directory in the debug mode and the RELEASE directory in release mode.
> I must be missing something.
TBass:
You want to have the .exe file and the .dll file in the same directory.
If you want, you can use a post-build event in the .exe project to copy
the DLL.

Signature
David Wilkinson
Visual C++ MVP