How compile program with curl support?

2013-08-22 Thread ilya-stromberg
I try to compile program with curl support, but I have error: import std.net.curl; void main() { } rdmd main.d /usr/lib/x86_64-linux-gnu/libphobos2.a(curl.o): In function `_D3std3net4curl4Curl19_sharedStaticCtor34FZv': std/net/curl.d:(.text._D3std3net4curl4Curl19_sharedStaticCtor34FZv+0xf):

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 07:28:52 UTC, ilya-stromberg wrote: I try to compile program with curl support, but I have error: ... i rarely use rdmd, so i can only advice to try using dmd directly with following flags and see if it works, and if works its a rdmd flags problem in your case:

Re: How compile program with curl support?

2013-08-22 Thread Ivan Kazmenko
On Thursday, 22 August 2013 at 07:28:52 UTC, ilya-stromberg wrote: undefined reference to `curl_global_init' undefined reference to `curl_global_cleanup' What should I do to get curl support? OS is Linux Ubuntu 12.10. I recently had the same problem on Windows (thread:

Re: How compile program with curl support?

2013-08-22 Thread Ivan Kazmenko
On Thursday, 22 August 2013 at 10:00:20 UTC, Ivan Kazmenko wrote: and then I link Sorry, that should have been: and then I link just like dmd myprog.d having both curl.lib (D bindings to C++ binary, built locally) and libcurl.dll (downloaded C++ libcurl binary) findable by the linker (in the

Re: How compile program with curl support?

2013-08-22 Thread David
What should I do to get curl support? OS is Linux Ubuntu 12.10. Install libcurl-dev http://packages.ubuntu.com/de/lucid/libcurl-dev Add -L-lcurl to your commandline

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 10:00:20 UTC, Ivan Kazmenko wrote: On Thursday, 22 August 2013 at 07:28:52 UTC, ilya-stromberg wrote: undefined reference to `curl_global_init' undefined reference to `curl_global_cleanup' What should I do to get curl support? OS is Linux Ubuntu 12.10. I

Re: How compile program with curl support?

2013-08-22 Thread ilya-stromberg
On Thursday, 22 August 2013 at 10:24:49 UTC, David wrote: What should I do to get curl support? OS is Linux Ubuntu 12.10. Install libcurl-dev http://packages.ubuntu.com/de/lucid/libcurl-dev Add -L-lcurl to your commandline Thanks for help. Correct answer was here:

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 13:15:39 UTC, ilya-stromberg wrote: On Thursday, 22 August 2013 at 10:24:49 UTC, David wrote: What should I do to get curl support? OS is Linux Ubuntu 12.10. Install libcurl-dev http://packages.ubuntu.com/de/lucid/libcurl-dev Add -L-lcurl to your commandline

Re: How compile program with curl support?

2013-08-22 Thread ilya-stromberg
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':

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 13:27:32 UTC, ilya-stromberg wrote: 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

Re: How compile program with curl support?

2013-08-22 Thread David
Am 22.08.2013 15:27, schrieb ilya-stromberg: 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

Re: How compile program with curl support?

2013-08-22 Thread Gary Willoughby
On Thursday, 22 August 2013 at 13:20:44 UTC, evilrat wrote: why do u link phobos when compiler do this for you? For some reason the order of linked libs matters especially with curl.

Re: How compile program with curl support?

2013-08-22 Thread Jordi Sayol
On 22/08/13 15:20, evilrat wrote: On Thursday, 22 August 2013 at 13:15:39 UTC, ilya-stromberg wrote: On Thursday, 22 August 2013 at 10:24:49 UTC, David wrote: What should I do to get curl support? OS is Linux Ubuntu 12.10. Install libcurl-dev http://packages.ubuntu.com/de/lucid/libcurl-dev