curl-library
Developing for "mingw32 -mms-bitfields" - both mingw32 and MSVC binary libs fail
Date: Mon, 11 Jul 2005 01:46:15 +0200
Hi,
am I assuming correctly that the mingw32 libs which are downloadable from
the libcurl website are *not* compiled with -mms-bitfields? I'm referring
to this zip:
<http://curl.haxx.se/download/curl-7.13.0-win32-ssl-devel-mingw32.zip>
If they are not compiled with -mms-bitfields, maybe you should state this
clearly on the download page. It means that anyone who develops programs
which use the Windows port of GTK+ will *not* be able to use this binary
distribution of libcurl. (Such a notice would have saved me several hours
of work today.)
AFAICT, in my case, neither curl-7.13.0-win32-ssl-devel-mingw32.zip nor
libcurl-7.14.0-win32-msvc.zip works:
- When I use the DLL in curl-7.13.0-win32-ssl-devel-mingw32.zip, my
application segfaults as soon as libcurl is called to start a download.
I was unable to make the MSYS gdb output any details about the crash.
- AFAIK, -mms-bitfields switches on MSVC-like struct layout and linking,
so libcurl-7.14.0-win32-msvc.zip should be a better choice. However, if
I use it, the resulting program needs zlibwapi.dll - but other parts of
my program already require zlib1.dll! :-| Somehow, this doesn't feel
right to me - I haven't tried whether using both DLLs actually works,
but in any case the duplicated code in the two DLLs is ugly.
So what I did was to build libcurl myself (using lib/Makefile.m32) with
-mms-bitfields. I used the OpenSSL distribution from
gnuwin32.sourceforge.net to enable SSL support for libcurl.
(Maybe you might want to add a link to
<http://gnuwin32.sourceforge.net/packages/openssl.htm> to the libcurl
download page!)
The resulting program works fine, but I'd like to avoid having to build my
own libcurl - is there any way? IMVHO, using -mms-bitfields is very popular
for Windows ports, you should consider offering a libcurl binary
distribution for this mingw32 flavour.
Cheers,
Richard
PS: Maybe all of the above is a mis-interpretation - who knows. I'm using a
mingw32-3.4.2.20040916.1 toolchain, maybe the reason for the crashes of the
curl-7.13.0-win32-ssl-devel-mingw32.zip libs is a different binary
incompatibility.
-- __ _ |_) /| Richard Atterer | GnuPG key: | \/¯| http://atterer.net | 0x888354F7 ¯ '` ¯Received on 2005-07-11