curl-and-python

Re: Windows builds

From: Oleg Pudeyev <oleg+pycurl_at_bsdpower.com>
Date: Thu, 19 Dec 2013 01:48:10 -0500

On Wed, 18 Dec 2013 21:20:15 +0100
"Gisle Vanem" <gvanem_at_yahoo.no> wrote:

> > Which package are you using that has a libcurl_imp.lib?
>
> All or most of them AFAICS. No package AFAIK specifies an
> import-lib named libcurl.lib. The FAQ (and also some curl
> lib/makefiles, a VC project-file and the horrid ugly mess in
> lib/Makefile.vc*), specifies libcurl_imp.lib (and libcurld_imp.lib
> for the debug version). From the FAQ 5.7:
> MSVC (release): libcurl.lib libcurl_imp.lib
> MSVC (debug): libcurld.lib libcurld_imp.lib
> Borland: libcurl.lib libcurl_imp.lib

OK, I see that in the docs but the files that get built here are
different.

My libcurl.lib name appears to come from here:

https://github.com/bagder/curl/blob/master/winbuild/MakefileBuild.vc#L79

... and I am following instructions here:

https://github.com/bagder/curl/blob/master/winbuild/BUILD.WINDOWS.txt

If I apply your patch changing import lib to libcurl_imp.lib my tree
fails to build. So if I am the one building windows packages that patch
won't work. However, I don't doubt what you say holds for your system,
therefore here is my proposed solution:

https://github.com/pycurl/pycurl/pull/92

You would give --curl-lib-name=libcurl_imp.lib --use-curl-dll options.

> Was your intention that pycurl.pyd should use libcurl as a DLL or
> a static lib?

I would have been happy with whichever was the default.

Otherwise I would gravitate toward a dll to permit replacement of
libcurl.dll. And if libcurl itself uses dlls for dependencies like
openssl/zlib etc., it makes no sense to ship those dlls but link
libcurl statically.

> The value of '_WIN32_WINNT' you mean? It would be better to always use
> a private pycurl_inet_ntop(). The inet_ntop() in Vista+ doesn't
> improve address- printing over WSAAddressToString(). Except maybe for
> non-AF_INET/AF_INET6. But such addresses would probably not occurs in
> pycurl.

OK, I made it unconditional until someone complains.

> BTW. pycurl_inet_ntop() didn't compile. A patch:

Thanks, https://github.com/pycurl/pycurl/pull/91.

Oleg
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-12-19