[Zlib-devel] Fwd: zlib app crashes on release, not debug in Visual C++

jbowler at acm.org jbowler at acm.org
Tue Aug 3 12:28:11 EDT 2010


I said:

From: John Bowler [mailto:jbowler at frontiernet.net] 
>I can confirm that I get the same behavior with Visual Studio 2010 (Pro). 

After more debugging it turns out that the problem (crash) happens within
the wrapper for zlibVersion that jumps into the DLL.  The DLL (i.e.
zlib1.dll) simply hasn't been loaded.

If I turn off /OPT:REF - the optimization which removes unused code and data
- the Release build works fine; I see the DLL being loaded and I get the
version string output by the program.  The option in question is off in
Debug builds.

Presumably the same thing is happening with VisualC 6 and, apparently, based
on the earlier reports, it is specific to the .lib in the distribution (I
interpret the original report as meaning that the *DLL* works fine if a
different import library is used.)

John Bowler <jbowler at acm.org>






More information about the Zlib-devel mailing list