cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: static link libcurl with VS2010 causes crash

From: Ward Willats <libcurl_at_wardco.com>
Date: Tue, 21 Feb 2012 10:27:38 -0800

At 8:31 AM -0800 2/21/12, JonathonS wrote:
>Note that I built libcurl myself and linked dynamically, and
>everything worked fine. So, this must be something specifically to
>static linking.

Think this free() problem is probably pilot error.

I built and linked libcurl 7.32.1 and SLL statically about 2 months
ago under Win7. Been using the output binaries from that since to
HTTP POST and GET with the easy interface and works fine. Had to use
the nmake makefiles, and had to patch them.

In MakefileBuild.vc on line 104:

      SSL=dll

should be:

      SSL=static

...I think Daniel fixed this. Also I had to change:

winbuild/MakefileBuild.vc line 102 from:

SSL_LIBS = libeay32.lib ssleay32.lib

to:

SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib

...for OpenSSL 1.0.0e linkage.

My namke line (YMMV):

nmake -f Makefile.vc MODE=static VC=10 WITH_SSL=static DEBUG=yes
WITH_DEVEL=../../deps USE_SSPI=no USE_IDN=no clean

I also have this cryptic note: "Need CURL_STATICLIB in cflags"

-- Ward
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-21