Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is "curl.lib" for DMD?

Tags:

curl

linker

d

When I import etc.c.curl; DMD tells me

Warning 2: File Not Found curl.lib

Where is this curl.lib?

(I've tried several packages from http://curl.haxx.se/download.html but haven't found curl.lib there. MSVC package libcurl-7.19.3-win32-ssl-msvc.zip have a curllib.lib but DMD won't link with it.)

like image 601
ArtemGr Avatar asked Oct 28 '11 19:10

ArtemGr


1 Answers

You can create curl.lib using implib. Implib is in the Basic Utilities download.

Run it against your curllib.dll in /libcurl-7.19.3-win32-ssl-msvc/lib/Release/ like this:

implib /s curl.lib curllib.dll

Then put curl.lib where dmd can find it and compile. Unfortunately, you'll probably still get an error about a missing libsasl.dll when you run your program. You may be able to use a binary from Shining Light Productions, build it with MSVC from the OpenSSL source, or hunt it down online.

There's still a possibility you'll have trouble with conflicting versions. If you browse the etc.c.curl source, you'll notice it lists its cURL version as 7.21.4, which doesn't match any of the Windows binaries available. If you want something very reliable, you may have to wait for the next D cURL module or build everything yourself.

like image 174
Corbin March Avatar answered Sep 17 '22 12:09

Corbin March