473,753 Members | 7,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Separate Directories for Debug and Release DLLs

Hello,

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
where I store the release version of a dll when set to RELEASE?

My current project uses about 8 dlls I've written in the past, but I
don't want to keep re-compiling them for debug/release depending on
whether I'm compiling the current project for debug/release.

Thanks in advance,
Tom

Oct 12 '07 #1
3 1998
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
where I store the release version of a dll when set to RELEASE?

My current project uses about 8 dlls I've written in the past, but I
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\Proj 1
// all project output of Proj1
X:\release\Proj 2
// 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

Oct 12 '07 #2
[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.
Oct 16 '07 #3
TBass wrote:
[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.
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.

--
David Wilkinson
Visual C++ MVP
Oct 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1879
by: DE | last post by:
Hello, I have a problem with python builds since some time. On windows, it is not a good idea to link your debug build to release builds of libs and dlls. But python installer gives you only release builds. So I need to build python myself, no problem, but ....
2
3212
by: nfr | last post by:
Default build directories seem to be somewhat different between C# and Visual Basic.NET. Both have "Debug" and "Release" directories under "obj". However, Visual Studio.NET defaults to a single "bin" directory whereas C# appears to duplicate the "Debug"/"Release" pattern under bin. This is creating problems for me in regards to browsed "References" added to a project. With C# I need to pick one, which is going to be bin/Debug during...
6
3855
by: ss | last post by:
Hi I built an exe in console debug mode & Release mode . The console debug mode -exe works fine ...but the release mode EXE starts well but fails mid way . The exe is being started as a service. So I need the Release mode EXE. I've checked the dlls being used . they are working fine for other services.
2
1231
by: Beeeeeves | last post by:
Why whenever I create a project in c#, when I compile it, it has got the resulting executable TWICE in TWO different directories - obj\debug and bin\debug. WHY? Sometimes when I'm trying to debug it, when I press F5 the one that's running is obviously not the same one to the one that i've just made changes to, as it doesn't seem to update my changes. Why does it do this stupid behaviour?
2
1421
by: babyx | last post by:
The release build class library can only work with msvcr71d.dll and msvcp71d.dll exist. How to make this class library work on any machine without using the debug dlls? What are the project settings that i need to take note so that it will become a "real" release build without depending on the debug dll? Can anybody help? Posted Via Usenet.com Premium Usenet Newsgroup Services
0
1282
by: Dave | last post by:
I've been developing lately with the Microsoft Application Data Blocks. When you use the default project after you install, it compiles debug and release mode dll's for you. How can I set up my project so that when I set my solution to Debug configuration I am using the debug dll's, and in Release configuration that I'm using the Release dlls? In C++ I used to do this by using a letter d as a suffix on the end of the DLL name for the...
4
1550
by: =?Utf-8?B?QldC?= | last post by:
We have a mixed application that includes managed and unmanaged code. Until recently we've been able to remote debug by disabling the security policy to get the MFC managed dlls to load properly over the network. However, we are now using classes in the system.data.dll assembly which according to connect.microsoft.com is not allowed to run with the security policy disabled. Here is the quote from them: In the 2.0 version of .NET,...
1
3433
by: moshehaim1 | last post by:
Hi, I am working with C++ code that needs to be maintained both in debug and release versions. The environment is Windows 32 bit with MSVC8. I downloaded the python installation for Win32 and installed it. When, however, I tried to compile my DLLs in debug mode i got link errors specifying that I need the python25_d.lib. this is the code that generates the dependency on the python25_d.lib
6
6578
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hi, I have a pretty complicated program which consists of the following basic modules: 1. a C# application 2. a C++/CLI application which is controlled by the C# app via IPC remoting 3. lots of native code which is wrapped by the managed C++/CLI code A remark to this complicated structure: We are controlling hardware via
0
9072
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9451
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9333
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6869
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3395
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.