std.net.curl

tired_eyes via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 17 05:52:36 PDT 2015


Hi,
I'm trying to compile this trivial example of std.net.curl:

// app.d
import std.stdio;
import std.net.curl;

void main() {
     auto content = get("dlang.org");
}

Hovewer, "dmd app.d" spits a whole bunch of strange error 
messages:

/usr/lib64/libphobos2.a(curl.o): In function 
`_D3std3net4curl4HTTP21_sharedStaticCtor1520FZv':
std/net/curl.d:(.text._D3std3net4curl4HTTP21_sharedStaticCtor1520FZv+0xf): undefined reference to `curl_version_info'
/usr/lib64/libphobos2.a(curl.o): In function 
`_D3std3net4curl4Curl21_sharedStaticCtor1522FZv':
std/net/curl.d:(.text._D3std3net4curl4Curl21_sharedStaticCtor1522FZv+0xa): undefined reference to `curl_global_init'
/usr/lib64/libphobos2.a(curl.o): In function 
`_D3std3net4curl4Curl21_sharedStaticDtor1523FZv':
std/net/curl.d:(.text._D3std3net4curl4Curl21_sharedStaticDtor1523FZv+0x5): undefined reference to `curl_global_cleanup'
/usr/lib64/libphobos2.a(curl_1ca7_192.o): In function 
`_D3std3net4curl4HTTP4Impl6__dtorMFZv':
std/net/curl.d:(.text._D3std3net4curl4HTTP4Impl6__dtorMFZv+0x19): 
undefined reference to `curl_slist_free_all'
/usr/lib64/libphobos2.a(curl_1cca_ea.o): In function 
`_D3std3net4curl3FTP4Impl6__dtorMFZv':
std/net/curl.d:(.text._D3std3net4curl3FTP4Impl6__dtorMFZv+0x18): 
undefined reference to `curl_slist_free_all'
/usr/lib64/libphobos2.a(curl_1cca_ea.o): In function 
`_D3std3net4curl3FTP3dupMFZS3std3net4curl3FTP':
std/net/curl.d:(.text._D3std3net4curl3FTP3dupMFZS3std3net4curl3FTP+0xab): undefined reference to `curl_slist_append'
/usr/lib64/libphobos2.a(curl_1cca_ea.o): In function 
`_D3std3net4curl3FTP13clearCommandsMFZv':
std/net/curl.d:(.text._D3std3net4curl3FTP13clearCommandsMFZv+0x20): undefined reference to `curl_slist_free_all'
/usr/lib64/libphobos2.a(curl_1cca_ea.o): In function 
`_D3std3net4curl3FTP10addCommandMFAxaZv':
std/net/curl.d:(.text._D3std3net4curl3FTP10addCommandMFAxaZv+0x67): undefined reference to `curl_slist_append'
/usr/lib64/libphobos2.a(curl_1ccf_432.o): In function 
`_D3std3net4curl4Curl10initializeMFZv':
std/net/curl.d:(.text._D3std3net4curl4Curl10initializeMFZv+0x3d): 
undefined reference to `curl_easy_init'
/usr/lib64/libphobos2.a(curl_1cd0_149.o): In function 
`_D3std3net4curl4Curl3dupMFZS3std3net4curl4Curl':
std/net/curl.d:(.text._D3std3net4curl4Curl3dupMFZS3std3net4curl4Curl+0x25): undefined reference to `curl_easy_duphandle'
/usr/lib64/libphobos2.a(curl_1cd4_37c.o): In function 
`_D3std3net4curl4Curl8shutdownMFZv':
std/net/curl.d:(.text._D3std3net4curl4Curl8shutdownMFZv+0x1a): 
undefined reference to `curl_easy_cleanup'
/usr/lib64/libphobos2.a(curl_1cd6_14c.o): In function 
`_D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionAxaZv':
std/net/curl.d:(.text._D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionAxaZv+0x5d): undefined reference to `curl_easy_setopt'
/usr/lib64/libphobos2.a(curl_1cd7_14c.o): In function 
`_D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv':
std/net/curl.d:(.text._D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv+0x2e): undefined reference to `curl_easy_setopt'
/usr/lib64/libphobos2.a(curl_1cd8_14c.o): In function 
`_D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionPvZv':
std/net/curl.d:(.text._D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionPvZv+0x2e): undefined reference to `curl_easy_setopt'
/usr/lib64/libphobos2.a(curl_1cd9_207.o): In function 
`_D3std3net4curl4Curl5clearMFE3etc1c4curl10CurlOptionZv':
std/net/curl.d:(.text._D3std3net4curl4Curl5clearMFE3etc1c4curl10CurlOptionZv+0x28): undefined reference to `curl_easy_setopt'
/usr/lib64/libphobos2.a(curl_1cda_67c.o): In function 
`_D3std3net4curl4Curl16clearIfSupportedMFE3etc1c4curl10CurlOptionZv':
std/net/curl.d:(.text._D3std3net4curl4Curl16clearIfSupportedMFE3etc1c4curl10CurlOptionZv+0x28): undefined reference to `curl_easy_setopt'
/usr/lib64/libphobos2.a(curl_1cdb_2fb.o): In function 
`_D3std3net4curl4Curl7performMFE3std8typecons41__T4FlagVAyaa12_7468726f774f6e4572726f72Z4FlagZi':
std/net/curl.d:(.text._D3std3net4curl4Curl7performMFE3std8typecons41__T4FlagVAyaa12_7468726f774f6e4572726f72Z4FlagZi+0x22): undefined reference to `curl_easy_perform'
/usr/lib64/libphobos2.a(curl_1cb0_65b.o): In function 
`_D3std3net4curl4HTTP16addRequestHeaderMFAxaAxaZv':
std/net/curl.d:(.text._D3std3net4curl4HTTP16addRequestHeaderMFAxaAxaZv+0x11b): undefined reference to `curl_slist_append'
/usr/lib64/libphobos2.a(curl_1cd2_4a1.o): In function 
`_D3std3net4curl4Curl11errorStringMFiZAya':
std/net/curl.d:(.text._D3std3net4curl4Curl11errorStringMFiZAya+0x11): undefined reference to `curl_easy_strerror'
collect2: error: ld returned 1 exit status
--- errorlevel 1

DMD 2.068.0, openSUSE 13.2 x64
I'm absolutely sure that I have licurl installed. "zypper info 
libcurl4" shows me that it's version is 7.43.0-2.1


More information about the Digitalmars-d-learn mailing list