A valid code that won't run?

via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 24 10:26:01 PDT 2015


On Friday, 24 April 2015 at 17:14:53 UTC, Steven Schveighoffer 
wrote:
> On 4/24/15 1:05 PM, cym13 wrote:
>> $ dmd test.d
>> /usr/lib/libphobos2.a(curl.o): In function
>> `_D3std3net4curl4HTTP21_sharedStaticCtor1500FZv':
>> (.text._D3std3net4curl4HTTP21_sharedStaticCtor1500FZv+0xf): 
>> undefined
>> reference to `curl_version_info'
>> /usr/lib/libphobos2.a(curl.o): In function
>> `_D3std3net4curl4Curl21_sharedStaticCtor1502FZv':
>> (.text._D3std3net4curl4Curl21_sharedStaticCtor1502FZv+0xf): 
>> undefined
>> reference to `curl_global_init'
>
> [snip]
>
> This is a sign you don't have libcurl available.

You need to link against libcurl explicitly, it doesn't happen 
automatically:

     dmd -L-lcurl test.d


More information about the Digitalmars-d mailing list