User forums > Using Code::Blocks

release vs debug version

(1/1)

maxcy:
 :) I have no idea how to go about searching for an answer to my compiler problem!!! I have a fairly large writing a compiler project, I have the code all finished, so it's time to compile it. I did just that for a release version as well as a debugger version. When I run the degub code version all is well!  When I try to run the release version the program comes to an abrupt exit!  Same code, different compiler run time results.  I have no idea what to do to troubleshoot this!
maxcy

Miguel Gimenez:
Differences among release and debug binaries are optimizations and memory layout, if the release is crashing I would look for a memory corruption. Also exception processing may be different.

You can locate the exit point using intermediate check points, like printing "Phase 1 start" in the console (or a log file) and later "Phase 1 end".

stahta01:
Turn up the warnings and look for un-initialized variables esp. pointers.

Edit: My post was not to be used instead of but in addition to the prior post

Tim S.

maxcy:
I did look at all the warnings and found ONE about a potentially unused variable. (xref.png) Looking at the attached code I found the variable declared, then initialized using strcmp. I then found this variable used 3 times later in the code. So I ignored this warning.  I did take out the -x (cross ref option) and ran the code once again. Now there is no problem running all the code! But the xref section of the code is obviously not running!!

Navigation

[0] Message Index

Go to full version