Sign in to follow this  

VS2005 - Different Between Debug & Release?

This topic is 3629 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You know how on Visual Studio 2005 there are those Debug and Releases that you can create when you compile & link your project? Well I wanted to know the difference between them. Oh, and one more question. I have been having some problems with redistributing my programs lately. They are written using C++ (with VS2005 Professional Edition) and SDL v1.3. I include all the SDL dll's that I use with the program, but people have been telling me that they can't run my programs. Is it because they need .NET Framework v2.0? Or is it another problem? Thanks in advance, -RazeDev

Share this post


Link to post
Share on other sites
In a basic sense, Release builds are just more optimized. Debug builds often contain all sorts of extra information for tracking errors, etc.

An easy way to see the difference is to simply look at the size of the executable that is generated by each build. For a decent sized program, you'll find Release is much smaller than Debug as it is optimized to use fewer commands and leaves out a lot of unrequired extras.

Basically, most people like to develop and test in Debug and then switch to Release when they're nearing project end.

NOTE: Always check Release builds work properly every now and then during development. The optimizers sometimes do some rather whacky things and it can be a nightmare to trace :P

Share this post


Link to post
Share on other sites
They most likely need the MSVC CRT DLL, which you're probably linking to (it's the default setting, and I believe you have to link to that if you're using SDL). You can either tell your buddies to download the runtime from here, or create a proper installer that will handle it.

And as for Debug and Release, while its true that the Release version usually includes optimizations and such (and by default is configured to do so), it's important to realize that they're just two profiles with two different groups of settings. You can configure each whichever way you choose or even create new profiles, although it's probably smart to stick with the standard conventions.

[Edited by - MJP on January 6, 2008 8:50:37 PM]

Share this post


Link to post
Share on other sites
Another thing to remember is that it turns on some optimized options not all of them. The standard containers still have debugging checks.

The reason others have a problem running your code is the fact that VC++ apps need several dlls distributed with them. Check msdn and search for it on the forums it was brought up recently.

Share this post


Link to post
Share on other sites
As MJP said, Debug and Release do the same thing, just with different parameters. They both run the compiler, then the linker etc., it's just that pass different parameters to each. You can easily look up the exact differences - right click on your project in your Solution Explorer, choose properties and in the top-left choose configuration (either Debug and or Release). You can then see exactly which settings are set to what, change them, or create new configurations.

Also, your program requires only whatever dependacies it uses. By default, VC compiles programs with dependacies on the VC redistributables, as described by others. If you use SDL, then your program will require SDL libraries, if you use DirectX, your program will require DX libraries etc. Same with the .Net framework -if you built your program on the .Net framework ("CLR" aka Common Language Runtime in the New Project menu) then you will have to have your users have .Net installed as your program needs its libraries.

Share this post


Link to post
Share on other sites

This topic is 3629 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this