Debug CRT vs. Relese CRT problems...
-
Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.
-
Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.
Hm... not sure I understand... but all varibles that are not assigned a value, will be assigned a random value in Release mode. I hope I'm right! Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.
In a Debug build all heap allocations are initialized to specific values etc. This doesn't happen in Release builds. Check all of your variables are being initialized correctly. Also read: "Surviving the Release Version" http://www.codeproject.com/debug/survivereleasever.asp[^] Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program