Short version:
If you run the program from VS2008 in Release mode, I want it to use
pathA\externaldll.dll. If you run the program from VS2008 in debug mode, I want it to use
pathB\externaldll.dll
Long version:
I have a program that is connected to external dll files (VTK). I myself created an external application both in debug mode and in Release mode. External dll files are located as follows:
<some path>\Debug\externalDll.dll
<some path>\Release\externalDll.dll
(therefore they are called the same, but they have different folders).
I want to go into external code for Debug Builds, but I want Builds releases to use release DLLs for runtime testing (I process large datasets).
Linking to the corresponding dlls is easy since I have project settings for this. But when executed, Visual Studio takes the first DLL that it finds in the PATH environment variable.
The idea of a cumbersome solution:
The presence of the PATH variable as: PATH =;% CURRENTDLLPATH%; and setting CURRENTDLLPATH in the post-build phase. Is there a solution built into VS2008?
source
share