
I have included all the files you need to use Daniel Stenberg's Win32 libcurl + SSL 7.15.4 library from D.  You need to download this from libcurl's download page and copy its dlls into the same directory as your D project in order to use them.  Do the same with openssl's libraries if you plan on using SSL (or just install openssl normally).  I have not included the import library for openssl, you will have to create this yourself if you need access to it (see below).

If you are using a different version (not 7.15.4) or build of libcurl, follow the steps below: 


To create your own curldef.d from libcurl's .h files: (you will need the htod.exe program from digital mars)

1.  copy the 7 .h files into the same directory as htodcurl.bat from the import/curl directory

2.  make a backup copy of curldef.d

3.  run htodcurl.bat

4.  open the new curldef.d

** For the modifications below, I have put the appropriate line numbers for version 7.15.4, your mileage will vary with other versions **

5.  change the module declaration at the top to be curldef rather than curl (2)

6.  remove the std.c.limits and std.c.types imports (97 - 105)

7.  in struct _N22 , rename char *version to *versionS (2109)

8.  change the import std.c.winsock2 to be std.c.windows.winsock ( 2333 )

9.  finally, find all the #define and struct which use a << operator to compute their values.  HTOD does not seem to convert these to D const values correctly, you will have to manually convert them, use the backup copy of curldef.d as a guide, maybe use windiff to make it easier. (207, 590, 1938, 2123, 2499)  


To create the libcurl import library (libcurl-3.lib), the command is: 

implib /system libcurl-3.lib libcurl-3.dll


To create the openssl import library (libeay32.lib), the command is: 

implib /system libeay32.lib libeay32.dll


- Kenneth Bogert