www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Getting libcurl for 64 bit Windows

reply "Mark Isaacson" <turck11 hotmail.com> writes:
I am attempting to make use of std.net.curl and having trouble
acquiring libcurl for 64 bit Windows. I need to be able to link
with the MSVC linker (which happens to be the default when
compiling using dmd with -m64). I've looked on the libcurl
website and not found any downloads that look promising.

I've tried following the instructions at:
http://wiki.dlang.org/Curl_on_Windows#Building_libcurl_64_bit

But when I compile the dll with: "dmd main.d -m64 -Llibcurl.dll"
I get the linker error:
libcurl.dll : fatal error LNK1107: invalid or corrupt file:
cannot read at 0x330

Might anyone have an idea as to how to resolve this?
Jun 26 2014
parent reply "Mark Isaacson" <turck11 hotmail.com> writes:
Managed to build it successfully I think, but have actually
returned to the problem that initially caused me to want to try
and build the library in the first place:

If I try to build a simple program:

import std.stdio;
import std.net.curl;

void main() {
    writeln("Hello world");
}

The program compiles, but does not print Hello World at
runtime... it just stops, and seemingly does nothing.

Trying to determine the root cause of that now.
Jun 26 2014
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/26/14, 11:11 AM, Mark Isaacson wrote:
 Managed to build it successfully I think, but have actually
 returned to the problem that initially caused me to want to try
 and build the library in the first place:

 If I try to build a simple program:

 import std.stdio;
 import std.net.curl;

 void main() {
     writeln("Hello world");
 }

 The program compiles, but does not print Hello World at
 runtime... it just stops, and seemingly does nothing.

 Trying to determine the root cause of that now.
Mark is my intern, and we're currently blocked by this in creating an important demo for tomorrow. Does anyone have good instructions for building libcurl on Win64, or prebuild .lib and .dll files? Thanks very much, Andrei
Jun 26 2014
next sibling parent "Mark Isaacson" <turck11 hotmail.com> writes:
Resolved the issue.
Jun 26 2014
prev sibling parent Brad Roberts via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
The one that the win64 auto-tester uses is here:

     http://downloads.dlang.org/other/
         curl-7.28.1-devel-rainer.win64.zip

There's a newer one available there, but I can't vouch for it.


On 6/26/14, 11:49 AM, Andrei Alexandrescu via Digitalmars-d-learn wrote:
 On 6/26/14, 11:11 AM, Mark Isaacson wrote:
 Managed to build it successfully I think, but have actually
 returned to the problem that initially caused me to want to try
 and build the library in the first place:

 If I try to build a simple program:

 import std.stdio;
 import std.net.curl;

 void main() {
     writeln("Hello world");
 }

 The program compiles, but does not print Hello World at
 runtime... it just stops, and seemingly does nothing.

 Trying to determine the root cause of that now.
Mark is my intern, and we're currently blocked by this in creating an important demo for tomorrow. Does anyone have good instructions for building libcurl on Win64, or prebuild .lib and .dll files? Thanks very much, Andrei
Jun 26 2014