Difference betw Debug & Release Versions


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???
Who is Participating?
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.
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.
ymw2Author Commented:
But I'm using VC++ 6.0..... :-(
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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.
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,
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.
ymw2Author Commented:
Ya rite
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.