Go Premium for a chance to win a PS4. Enter to Win


Difference betw Debug  & Release Versions

Posted on 1998-11-25
Medium Priority
Last Modified: 2013-11-20

When I execute my debug exe, the application work fine.... But it doesn't seem working on the release exe with the exact source code...

Anyone know the reason behind it?? How to remedy it???
Question by:ymw2

Expert Comment

ID: 1325334
First, it is not your fault. you now who to blame... it's Microsoft!!

If you are using VC5.0 or LOWER, it is well known that release versions don't work. It is soppused to be fixed in VC6.0 although i didn't try it myself yet.

Author Comment

ID: 1325335
But I'm using VC++ 6.0..... :-(

Expert Comment

ID: 1325336
Maybe Microsoft hasn't yet fixed it. However, you could try certain things:
Make sure that the project settings refer to the release libraries.
Rebuild and not build your program.
Hope it helps.
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Accepted Solution

Bridge earned 40 total points
ID: 1325337
Function calls like ASSERT, ASSERT_VALID are removed in release mode. Make sure that you have nothing in these blocks that needs to be executed.
Appart from that its a case of going through placing message boxes in the code to find out where the error occurs. If you have a copy of Purify then your half way there because it is great at sorting problems like this.

Expert Comment

ID: 1325338
what error/errors do you get when you try to run in release mode? you can also build release mode with debug info.

good luck,

Expert Comment

ID: 1325339
It is possible that the compiler/optimizer is causing trouble.  I have seen problems in the past.  To test, Set to Release version, go to menu Project/Setting use the C++ tab, set the optimization to off and re-build your project.  If this un-optimized "Release" version works then you have code with an optimizer bug.  Lots of Luck.

You can turn the optimizer off you individual source code cpp files if necessary.

By the way, I am professionally using Visual C++ 5.0 because it is relatively bug free.  We trail about a year behind Microsoft to give them a chance to find the bugs and issue service packs.

Author Comment

ID: 1325340
Ya rite

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question