cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Some questions regarding building libcurl with openssl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 13 Nov 2006 22:18:59 +0100 (CET)

On Mon, 13 Nov 2006, Tom Jerry wrote:

> Now, I want to be able to create both debug and release versions of libcurl,
> but I want it to be compiled with the /MT (or /MTd) option for the CRT.

> 1) Using the supplied Makefile (and Makefile.vc6), how do I control the
> MD/MT flag? Should I edit it manually?

Yes, you either edit it manually or use different targets that build
differently. Either way, you should study the makefile to get to know the
details.

> 2) Do you encourage the use of makfile on windows (and therefore maintain
> it) or that using the curllib.dsp is more recommended?

Personally, I wouldn't dream of writing software without makefiles. I've never
understood people who like the tools to magically attempt to do all those
things behind your back. Call me grumpy or old school, but that's me! ;-)

> 3) I really want to use the curllib.dsp (it is easier on windows). So I
> added the USE_SSLEAY preprocessor definition (saw it in the mailing list)
> and the appropriate include path and lib path to openssl libraries. It
> compiles and links ok. Is the USE_SSLEAY flag all that I need?

You can easily verify that by trying a HTTPS URL, or possibly call
curl_version() and see if it replies with an openssl version included.

> 4) The following is taken from openssl 0.9.8 FAQ:
> "Note that debug and release libraries are NOT interchangeable. If you
> built OpenSSL with /MD your application must use /MD and cannot use /MDd.

[...]

> So does it influence the build process of libcurl? Should I include
> applink.c in the libcurl.dsp in case I'm using /MD for building libcurl?

I can't respond to this. I have no idea.

> 6) what about debug vs release builds? Can I build debug version of libcurl
> using release version of openssl and run it?

I would think so. AFAIK, a debug version of libcurl (in the MSVC sense) is
just a matter of linking with another libc and keeping some debug symbols.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-11-13