Sign in to follow this  
be17_17y

Debug - Release

Recommended Posts

be17_17y    128
What should i do to compile program using release set... i had build it using setting in debug mode... and the program run succesfully but when i try to use release mode.. there are error, i'm pretty sure not a single code missing in file.... so why it can be happen ? how can i fix it ?

Share this post


Link to post
Share on other sites
ukdeveloper    264
We'll need to see some code. To be honest, it could be anything.

When you run a program in Debug mode, certain things are different than in Release mode. There'll be somebody here who can be more helpful, that's all I know, but you do need to be more specific.

What errors are you getting? When and how are they occurring?

HTH,

ukdeveloper.

Share this post


Link to post
Share on other sites
Sandman    2210
Please provide a bit more detail with your questions - with so little information it's hard to do much more than guess what the problem is. What kind of errors are you getting? Compiler errors? Linker errors? Run time errors? What are the error messages? What compiler are you using?

My guess is that you're getting something like "LNK2001: Unresolved External blah blah blah". In which case, the release configuration is missing some library files. Assuming your using MSVC.Net, go to project->properties->linker->input and make sure that the list of libraries in the additional dependencies box is the same for both Debug and Release configurations.

Share this post


Link to post
Share on other sites
kusma    170
there's a lot of possible reasons why it's not working in release-mode, and they are all most likely due to a bug in your code. bugs that don't reproduce in debug-mode are usually related to stuff like pointers not being initialized etc. the debug-crt in msvc initialize all allocated memory to something like 0xCDCDCDCD (don't quite remember, but you'll recognize it easily). anyway, just try removing parts of your program until you find out what part cause the bug or something. i know, it's a pain in the ass, but un-reproducable bugs usually simply are ;)

Share this post


Link to post
Share on other sites
Sandman    2210
Quote:
Original post by kusma
anyway, just try removing parts of your program until you find out what part cause the bug or something. i know, it's a pain in the ass, but un-reproducable bugs usually simply are ;)


If it's a run time problem, you could go around deleting chunks of your program, recompiling and running until it doesn't crash...

Or you could use the debugger. [grin]

Share this post


Link to post
Share on other sites

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