[Top][All Lists]

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

Re: [Mingw-users] Re: "Re: libbfd, libtool & Win32" and "Re: Building a

From: Guido Draheim
Subject: Re: [Mingw-users] Re: "Re: libbfd, libtool & Win32" and "Re: Building a MinGW GLibetc..."
Date: Tue, 17 Sep 2002 22:05:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Earnie Boyd wrote:
Guido Draheim wrote:

Max Bowsher wrote:

Guido Draheim wrote:

How old may a gcc/binutils pair be? My oldest crosscompilers
are gcc 2.95.3 and ld --version reports And for
all I know, these are in fact the oldest versions around,
no one want to go back beyond, I guess.

Is that enough, Max?


$ echo '__declspec(dllexport) void foo () {}' > foo.c
$ gcc -shared foo.c -o foo.dll
$ objdump -p foo.dll | fgrep -A 5 Characteristics

The real problem is in a `gcc -shared foo.c -o foo.dll -lz`
and whether gcc can find the zlib dll, and link it even
when no .dll.a is available, with just the dll being present.

libfoo.dll.a should represent the import library.  libfoo.a should
represent the static library.  libfoo.dll is also able to be used for
the import library.  I forget the ld search order, libfoo.dll.a,
libfoo.a then libfoo.dll or is it libfoo.dll.a, libfoo.dll then
libfoo.a,  IIRC, it's the former and not the latter.  If that is the
case a libfoo.a that is truely a static library will be used instead of
the shared library libfoo.dll.

The zlib is probably a good example - quite some portable
software makes use of it, including my

Then you should know.

No, because I did just switch my system, and have to reinstall some
rpms - crosscompiler and stuff is some that. Atleast I am still
missing the crosscompiled zlib stuff that I used to use to
crosscompile the project - before going deeper, here's a quick try
with the stock zlib.dll which stil have on my disk leftover from
the link experiments with the borland compilers:

$ i386-mingw32-ld  -shared  -L../../zlib114dll/dll32 -o zzip.dll \
     zzip-zip.lo zzip-file.lo zzip-dir.lo zzip-stat.lo zzip-info.lo \
     zzip-err.lo zzip-io.lo -lz
i386-mingw32-ld: cannot find -lz

$ ls -l ../../zlib114dll/dll32
insgesamt 80
lrwxrwxrwx    1 guidod   root            8 Sep 17 21:51 libz.dll -> zlib.dll
-rw-r--r--    1 guidod   root         6656 Mär 13  2002 zlib_bor.lib
-rw-r--r--    1 guidod   root        53248 Mär 13  2002 zlib.dll
-rw-r--r--    1 guidod   root        14310 Mär 13  2002 zlib.lib

$ i386-mingw32-objdump -p ../../zlib114dll/dll32/libz.dll | grep deflate
        [   3] deflate
        [   4] deflateCopy
        [   5] deflateEnd
        [   6] deflateInit2_
        [   7] deflateInit_
        [   8] deflateParams
        [   9] deflateReset
        [  10] deflateSetDictionary

.... well, perhaps that's not the right thing to go at it, the rest
has to wait a bit till I get all things together again...

reply via email to

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