[Zlib-devel] Fwd: Error when using zlib 1.2.5 in VS 2005

jbowler at acm.org jbowler at acm.org
Thu Aug 5 02:44:50 EDT 2010


From: Mark Adler
> From: Sihan Goi <goister at gmail.com>
>> However, I get the following warning message:
>> zdll.lib(d000062.o) : warning LNK4078: multiple '.text' sections found 
>> with different attributes (E0300020)

That message is symptomatic of a project rebuild against the defective
zdll.lib (the non-defective, "vs2010" zdll.lib does not produce that
warning, and the member name d000062.o is characteristic of the MinGW .lib.)

Since the warning is produced the application has been relinked and, I would
guess, it was recompiled too - i.e. I don't think it's an issue caused by an
ABI change.

I don't understand the warning, but the member (d000062.o) is the one that
contains the code for uncompress - the function Sihan Goi calls (i.e. it
contains the code that gets linked into the app and manages the jmp to the
actual code in zlib1.dll).

> When I try to run my program, it also bombs out with an application
> error: The application failed to initialize properly (0xc000007b).

In the presence of the /OPT:REF option the actual dependency on zlib1.dll
won't be there, the DLL won't be loaded at app start (the default is not to
delay load the required DLLs) and the application won't have initialized
properly.  In my test case this isn't detected; the application simply
performs a jmp into an effectively random place in a different DLL, but I
can easily believe other environments might detect the rather serious
initialization problem.

It's easy to find out if this *is* the problem - relink with /OPT:NOREF (in
the 'linker/optimizations' page of the project properties in VS2010.)

John Bowler <jbowler at acm.org>






More information about the Zlib-devel mailing list