1 $Id: README.ares,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
6 \___|\___/|_| \_\_____|
8 How To Build libcurl to Use c-ares For Asynch Name Resolves
9 ===========================================================
12 http://daniel.haxx.se/projects/c-ares/
15 The latest libcurl version requires c-ares 1.4.0 or later.
17 Once upon the time libcurl built fine with the "original" ares. That is no
18 longer true. You need to use c-ares.
23 1. unpack the c-ares archive
28 Build libcurl to use c-ares in the curl source tree
29 ===================================================
31 1. name the c-ares source directory 'ares' in the curl source directory
32 (if you have checked out the curl sources from CVS, you will already have
33 c-ares in a directory named ares).
34 2. ./configure --enable-ares
37 Build libcurl to use an installed c-ares
38 ========================================
40 1. ./configure --enable-ares=/path/to/ares/install
46 If the configure script enables IPv6 support you need to explicitly disable
47 that (--disable-ipv6) since c-ares isn't IPv6 compatible (yet).
51 (description brought by Dominick Meglio)
53 First I compiled c-ares. I changed the default C runtime library to be the
54 single-threaded rather than the multi-threaded (this seems to be required to
55 prevent linking errors later on). Then I simply build the areslib project (the
56 other projects adig/ahost seem to fail under MSVC).
58 Next was libcurl. I opened lib/config-win32.h and I added a:
61 Next thing I did was I added the path for the ares includes to the include
62 path, and the libares.lib to the libraries.
64 Lastly, I also changed libcurl to be single-threaded rather than
65 multi-threaded, again this was to prevent some duplicate symbol errors. I'm
66 not sure why I needed to change everything to single-threaded, but when I
67 didn't I got redefinition errors for several CRT functions (malloc, stricmp,
70 I would have modified the MSVC++ project files, but I only have VC.NET and it
71 uses a different format than VC6.0 so I didn't want to go and change
72 everything and remove VC6.0 support from libcurl.