[Zlib-devel] zlib 1.2.4 released!
Mark Brown
broonie at sirena.org.uk
Wed Mar 17 06:37:40 EDT 2010
On Wed, Mar 17, 2010 at 12:20:01PM +0200, T?r?k Edwin wrote:
> On 03/17/2010 10:53 AM, Gilles Vollant wrote:
> > with Visual C++ 2008 or 2010, using /MT you can use statically linked
> > runtime
> I'm told that is exactly what NOT to do:
> "as soon as you pass a FILE or a fd or any other HeapAlloc object it
> will detect a heap corruption and die"
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
> I don't think a single zlib DLL will work anyway.
> Passing file descriptors between mismatching CRT versions won't work.
> You'd probably need one DLL for each CRT version.
Pretty much if you're passing file descriptors in via gzdopen() or
passing FILE * around, though since the different runtimes all have
different names and the debug runtimes are not compatible with the
release runtimes this possibility exists with both shared and static
linking of the runtime. However, if you're using gzopen() only or not
using gzio at all then statically linking in the runtime makes life a
bit easier since it avoids the possibility of ABI incompatibilities with
Windows DLL linking is different to Unix shared libraries since the link
is to a specific symbol in a specific DLL rather than to a symbol in any
old DLL the process happens to load, meaning that you can have multiple
copies of the runtime in one process without any upset so long as you
don't try to make the two copies talk to each other.
More information about the Zlib-devel
mailing list