How compile program with curl support?

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Thu Aug 22 06:27:30 PDT 2013


On Thursday, 22 August 2013 at 13:20:44 UTC, evilrat wrote:
> why do u link phobos when compiler do this for you?

Because without it doesn't work:

$ dmd -L-lcurl main.d
/usr/lib/x86_64-linux-gnu/libphobos2.a(curl.o): In function 
`_D3std3net4curl4Curl19_sharedStaticCtor34FZv':
std/net/curl.d:(.text._D3std3net4curl4Curl19_sharedStaticCtor34FZv+0xf): 
undefined reference to `curl_global_init'
/usr/lib/x86_64-linux-gnu/libphobos2.a(curl.o): In function 
`_D3std3net4curl4Curl19_sharedStaticDtor35FZv':
std/net/curl.d:(.text._D3std3net4curl4Curl19_sharedStaticDtor35FZv+0x5): 
undefined reference to `curl_global_cleanup'

Have you got any ideas why?!


More information about the Digitalmars-d-learn mailing list