std.net.curl not working in 2.058 for Windows

Brad Anderson eco at gnuk.net
Thu Feb 23 23:59:49 PST 2012


There is no documentation (both on dlang.org and in the local 
documentation) so I'm not sure if it's supposed to be working 
yet.  I get linker errors when I try to use it:

     $ dmd netcurl.d
     OPTLINK (R) for Win32  Release 8.00.12
     Copyright (C) Digital Mars 1989-2010  All rights reserved.
     http://www.digitalmars.com/ctg/optlink.html
     netcurl.obj(netcurl)
      Error 42: Symbol Undefined 
_D3std3net4curl3FTP8__cpctorMxFKxS3std3net4curl3FTPZv
     netcurl.obj(netcurl)
      Error 42: Symbol Undefined 
_D3std3net4curl3FTP11__fieldDtorMFZv
     netcurl.obj(netcurl)
      Error 42: Symbol Undefined _D3std3net4curl3FTP7performMFZv
     netcurl.obj(netcurl)
      Error 42: Symbol Undefined 
_D3std3net4curl13CurlException7__ClassZ
     netcurl.obj(netcurl)
      Error 42: Symbol Undefined 
_D3std3net4curl13CurlException6__ctorMFAyaAyakC6object9ThrowableZC3std3net4curl13CurlException
     netcurl.obj(netcurl)

     [snip]

Furthermore the documentation in the actual source says this 
should work:

     string content = get("http://dlang.org");

But that results in a compiler error error:

     netcurl.d(5): Error: cannot implicitly convert expression 
(get("http://dlang.org",AutoProtocol())) of type char[] to string

get() signature from the source is:

     T[] get(Conn = AutoProtocol, T = char)(const(char)[] url, 
Conn conn = Conn())
         if ( isCurlConn!Conn && (is(T == char) || is(T == ubyte)) 
)

An .idup fixes it, of course, but the documentation is wrong (or 
the signature is wrong).

Finally, was the curl library included?  If not, where can it be 
found?  It needs to be an OMF version, right?  I don't see an OMF 
version on curl's website.

Regards,
Brad Anderson


More information about the Digitalmars-d-learn mailing list