mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] vigra and openexr zlib calls


From: Mark Brand
Subject: [Mingw-cross-env-list] vigra and openexr zlib calls
Date: Thu, 22 Sep 2011 01:11:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110907 Thunderbird/6.0.2

Hi,

While updating vigra [2], I noticed that the new version depends on openexr. I was surprised to find out that linking test-vigra.exe failed due to zlib symbols address@hidden and address@hidden referenced by openexr not being found, despite -lz.

After some poking around, I decided that the problem was caused by ZLIB_WINAPI being defined in openexr source files. Via zconf.h, this causes the symbols to be decorated with the '@16', apparently following the stdcall calling convention. Removing the ZLIB_WINAPI seems to solve the problem[1].

As an alternative, I tried using "-Wl,--enable-stdcall-fixup" when linking test-vigra.exe, but that had no apparent effect.

It seems strange that this has not come up earlier, since anybody linking to openexr would have had this problem.

Feedback is welcome! This includes the subject of whether something like the patch in [1] should be suggested upstream.

[1] http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/b4be43902185
[2] http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/087ea4b1419d

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]