www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How do I compile a program with curl lib on Windows?

reply Neto <neto.ribeiro email.com> writes:
Could someone give me an example to how do I compile a program 
with support to curl on Windows? Where do I find the .lib for 
link against my D programa under Windows or do I need to compile 
it myself? I downloaded the lib versions at curl's official web 
site but I find either .a files or .h in the lib folder
Aug 10
parent reply Neto <neto.ribeiro email.com> writes:
On Thursday, 10 August 2017 at 20:29:53 UTC, Neto wrote:
 Could someone give me an example to how do I compile a program 
 with support to curl on Windows? Where do I find the .lib for 
 link against my D programa under Windows or do I need to 
 compile it myself? I downloaded the lib versions at curl's 
 official web site but I find either .a files or .h in the lib 
 folder
UPDATE: Found the links right here:
 https://github.com/HazeProductions/libcurl
Compiling as:
 dmd  -dw -m32 -L-lcurl app.d 
 -I"C:\Users\neto\Desktop\static-debug-x86"
I get the following error:
 OPTLINK: Warning 9: Unknow option: LCURL
What am I missing? is the library name wrong/couldn't be found or what else?
Aug 10
parent Neto <neto.ribeiro email.com> writes:
UPDATE 2:

Managed to do it! Got the precompiled binaries from here:

 https://github.com/HazeProductions/libcurl
(thank frk1 very much for his repo) downloaded them then extracted the release folder to proper curl folder on my machine then
 dmd -L-libcurl app.d -I"C:\libcrl"
worked just fine. Topic closed.
Aug 10