2
0

README.ares 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. _ _ ____ _
  2. ___| | | | _ \| |
  3. / __| | | | |_) | |
  4. | (__| |_| | _ <| |___
  5. \___|\___/|_| \_\_____|
  6. How To Build libcurl to Use c-ares For Asynch Name Resolves
  7. ===========================================================
  8. c-ares:
  9. http://c-ares.haxx.se/
  10. NOTE
  11. The latest libcurl version requires c-ares 1.6.0 or later.
  12. Once upon the time libcurl built fine with the "original" ares. That is no
  13. longer true. You need to use c-ares.
  14. Build c-ares
  15. ============
  16. 1. unpack the c-ares archive
  17. 2. cd c-ares-dir
  18. 3. ./configure
  19. 4. make
  20. 5. make install
  21. Build libcurl to use c-ares in the curl source tree
  22. ===================================================
  23. 1. name or symlink the c-ares source directory 'ares' in the curl source
  24. directory
  25. 2. ./configure --enable-ares
  26. Optionally, you can point out the c-ares install tree root with the the
  27. --enable-ares option.
  28. 3. make
  29. Build libcurl to use an installed c-ares
  30. ========================================
  31. 1. ./configure --enable-ares=/path/to/ares/install
  32. 2. make
  33. c-ares on win32
  34. ===============
  35. (description brought by Dominick Meglio)
  36. First I compiled c-ares. I changed the default C runtime library to be the
  37. single-threaded rather than the multi-threaded (this seems to be required to
  38. prevent linking errors later on). Then I simply build the areslib project (the
  39. other projects adig/ahost seem to fail under MSVC).
  40. Next was libcurl. I opened lib/config-win32.h and I added a:
  41. #define USE_ARES 1
  42. Next thing I did was I added the path for the ares includes to the include
  43. path, and the libares.lib to the libraries.
  44. Lastly, I also changed libcurl to be single-threaded rather than
  45. multi-threaded, again this was to prevent some duplicate symbol errors. I'm
  46. not sure why I needed to change everything to single-threaded, but when I
  47. didn't I got redefinition errors for several CRT functions (malloc, stricmp,
  48. etc.)
  49. I would have modified the MSVC++ project files, but I only have VC.NET and it
  50. uses a different format than VC6.0 so I didn't want to go and change
  51. everything and remove VC6.0 support from libcurl.