www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.net.curl on Windows

reply "Ivan Kazmenko" <gassa mail.ru> writes:
Hi!

To use std.net.curl successfully with DMD 2.063.2 on Windows, I 
had to follow the steps below:

-----

1. Download libcurl from here: 
http://curl.haxx.se/download.html#Win32.

2. Extract libcurl.dll.

3. Download implib tool from here: 
http://ftp.digitalmars.com/bup.zip, as OPTLINK's /IMPLIB option 
did not work for me at all (error 138).

4. Run "implib.exe /system curl.lib libcurl.dll".

5a. Put the lib and dll in the current directory, OR

5b. modify the LIB line of DMD's bin\sc.ini file.

-----

The steps themselves, especially the "/system" option which added 
the needed "_" prefix to function names in the lib file, required 
quite a bit of googling and guessing for me as I'm not used to 
linking different formats of libraries by myself.

Is there an easier way?  How to learn about it?  A detailed 
instruction (at least as detailed as the steps above) at the top 
of the manual page (http://dlang.org/phobos/std_net_curl.html) 
would have been nice... After all, it's a third party library not 
fully supplied with the compiler.

Ivan Kazmenko.
Aug 09 2013
parent reply David <d dav1d.de> writes:
 Is there an easier way?  How to learn about it?  A detailed instruction
 (at least as detailed as the steps above) at the top of the manual page
 (http://dlang.org/phobos/std_net_curl.html) would have been nice...
 After all, it's a third party library not fully supplied with the compiler.
Thew installer has an option to install curl with D.
Aug 09 2013
parent "Ivan Kazmenko" <gassa mail.ru> writes:
On Friday, 9 August 2013 at 10:26:05 UTC, David wrote:
 Is there an easier way?  How to learn about it?  A detailed 
 instruction
 (at least as detailed as the steps above) at the top of the 
 manual page
 (http://dlang.org/phobos/std_net_curl.html) would have been 
 nice...
 After all, it's a third party library not fully supplied with 
 the compiler.
Thew installer has an option to install curl with D.
Thank you, that's good to know! And the download page contains D-compatible libcurl download at the bottom, which I overlooked (albeit not the current version) - sorry! Still, the all-platforms zip, which is the first download option (and so I happily grabbed it), seems to contain neither libcurl nor sufficient documentation on how to install it. So my point that the docs are somewhat lacking is still valid. Ivan Kazmenko.
Aug 09 2013