[cairo] cross-compiling on Linux for Windows

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Sun Oct 11 06:47:56 PDT 2009


I'm sorry for posting about Win32 DLL,
not about cairo but about zlib.

On Sun, 11 Oct 2009 15:39:14 +0300
Tor Lillqvist <tml at iki.fi> wrote:

>> I don't know if Windows DLL has any record of its name
>> in the binary,
>I don't think so, but still I recommend against renaming DLLs.
>> but if I copy zlib1.dll to libz.dll.a
>> (and zlib.dll to libz.a),
>That sounds quite a bit confusing. Copying a dll into a .dll.a, which
>is one naming convention for import libraries, does not make sense.
>Did you mistype?

I'm sorry, I mistyped. zlib1.dll to libz.dll,
and zlib.lib to libz.a.

>What I meant was just to copy the import library you have, whatever it
>might be called, to such a name so that your mingw GNU ld will find it
>when you specify -lz , which I think was what you wanted? I.e.,
>libz.dll.a or libz.a. Copying or renaming the DLL itself is wrong as
>the import library (whatever the name of the import library) refers to
>the DLL under its original name.

When I execute "i586-mingw32msvc-objdump -p libz.dll",
I can find such line:

Name                            000000000000f416 zlib1.dll

And, from libpng12-0.dll built with renamed DLL,
I can find such line in the output of objdump

 00027028       000270d0 00000000 00000000 00027448 00027178

        DLL Name: zlib1.dll
        vma:  Hint/Ord Member-Name Bound-To
        2731c       4  crc32
        27324       5  deflate
        27330       8  deflateEnd
        27340       9  deflateInit2_
        27350      13  deflateReset
        27360      35  inflate
        2736c      40  inflateEnd
        2737c      42  inflateInit_
        2738c      43  inflateReset

So, now I think I SHOULD copy or symlink DLL to
the names that the linker can resolves, and I
MUST NOT rename DLL, because runtime dynamic loader
cannot find the required DLL. Am I understanding correctly?


More information about the cairo mailing list