Why is it that sometimes when I compile in debug mode some parts of the program do not work, but when I am using release mode it works. For example some FILE I/O I was doing...
Printable View
Why is it that sometimes when I compile in debug mode some parts of the program do not work, but when I am using release mode it works. For example some FILE I/O I was doing...
Well 15 views and no answer.......let me myself take a guess........is it because Debug Mode is more Strict? :D
Are you using g++?
Try compiling with -Wall which will issue all warnings known.
It means your program still has bugs - usually ones which relate in some way to abuse of memory
Such as
- running off the end of an array / allocated memory
- use of uninitialised variables
- dereference of a pointer before allocation or after free
- assumptions about packing and or alignment
> is it because Debug Mode is more Strict?
Well it has more checks - in particular malloc and free typically have dead-mans-land zones at either end to detect overruns, and the contents are trashed as soon as you free it (to detect use-after-free errors)
> Well 15 views and no answer
Maybe so, but it's still a bump
Sometimes in VC++, I forget that I have specific libraries setup in Debug config, and don't remember to add them to the Release config. Same thing for certain preprocessors.
May not be your problem, but I've done this more than a few times :D
when it happens to me, most of the time it turns out to be an uninitialized variable issue.