digitalmars.D.learn - request assistance resolving curl related linker error
- Andrew Edwards (30/30) Aug 18 2014 import std.net.curl;
- Martin Nowak (4/9) Aug 18 2014 The problem here is that std.net.curl is based on libcurl, so you
- Martin Nowak (3/6) Aug 18 2014 I also added an enhancement request to load curl at runtime.
- Andrew Edwards (2/14) Aug 18 2014 Okay, got it. Thank you much.
- ketmar via Digitalmars-d-learn (6/8) Aug 18 2014 On Tue, 19 Aug 2014 09:56:30 +0900
- Vladimir Panteleev (4/12) Aug 18 2014 And Windows. Since, apparently, pragma(lib) is only supported by
- ketmar via Digitalmars-d-learn (4/6) Aug 18 2014 On Tue, 19 Aug 2014 03:37:23 +0000
- Vladimir Panteleev (3/9) Aug 19 2014 Hmm, I believe I've been lied to, then!
- Andrew Edwards (3/11) Aug 18 2014 Actually, that's exactly what I did.
import std.net.curl; void main(){} // Output: Undefined symbols for architecture x86_64: "_curl_easy_cleanup", referenced from: _D3std3net4curl4Curl8shutdownMFZv in libphobos2.a(curl_3063_37c.o) "_curl_easy_setopt", referenced from: _D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionAxaZv in libphobos2.a(curl_3065_14c.o) _D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv in libphobos2.a(curl_3066_14c.o) _D3std3net4curl4Curl5clearMFE3etc1c4curl10CurlOptionZv in libphobos2.a(curl_3068_207.o) _D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionPvZv in libphobos2.a(curl_3067_14c.o) "_curl_easy_strerror", referenced from: _D3std3net4curl4Curl11errorStringMFiZAya in libphobos2.a(curl_3061_4a1.o) "_curl_global_cleanup", referenced from: _D3std3net4curl4Curl19_sharedStaticDtor36FZv in libphobos2.a(curl.o) "_curl_global_init", referenced from: _D3std3net4curl4Curl19_sharedStaticCtor35FZv in libphobos2.a(curl.o) "_curl_slist_free_all", referenced from: _D3std3net4curl4HTTP4Impl6__dtorMFZv in libphobos2.a(curl_3032_192.o) "_curl_version_info", referenced from: _D3std3net4curl4HTTP19_sharedStaticCtor34FZv in libphobos2.a(curl.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1
Aug 18 2014
On Monday, 18 August 2014 at 14:24:54 UTC, Andrew Edwards wrote:import std.net.curl; void main(){} // Output: Undefined symbols for architecture x86_64: "_curl_easy_cleanup", referenced from:The problem here is that std.net.curl is based on libcurl, so you need to link your program against it. Add '-L-lcurl' to your dmd invocation to do this.
Aug 18 2014
On Monday, 18 August 2014 at 16:09:04 UTC, Martin Nowak wrote:The problem here is that std.net.curl is based on libcurl, so you need to link your program against it. Add '-L-lcurl' to your dmd invocation to do this.I also added an enhancement request to load curl at runtime. https://issues.dlang.org/show_bug.cgi?id=13324
Aug 18 2014
On 8/19/14, 1:09 AM, Martin Nowak wrote:On Monday, 18 August 2014 at 14:24:54 UTC, Andrew Edwards wrote:Okay, got it. Thank you much.import std.net.curl; void main(){} // Output: Undefined symbols for architecture x86_64: "_curl_easy_cleanup", referenced from:The problem here is that std.net.curl is based on libcurl, so you need to link your program against it. Add '-L-lcurl' to your dmd invocation to do this.
Aug 18 2014
On Tue, 19 Aug 2014 09:56:30 +0900 Andrew Edwards via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:or you can add pragma(lib, "curl"); to your source file if you are using dmd.Add '-L-lcurl' to your dmd invocation to do this.Okay, got it. Thank you much.
Aug 18 2014
On Tuesday, 19 August 2014 at 02:24:48 UTC, ketmar via Digitalmars-d-learn wrote:On Tue, 19 Aug 2014 09:56:30 +0900 Andrew Edwards via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:And Windows. Since, apparently, pragma(lib) is only supported by COFF and OMF.or you can add pragma(lib, "curl"); to your source file if you are using dmd.Add '-L-lcurl' to your dmd invocation to do this.Okay, got it. Thank you much.
Aug 18 2014
On Tue, 19 Aug 2014 03:37:23 +0000 Vladimir Panteleev via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:And Windows. Since, apparently, pragma(lib) is only supported by=20 COFF and OMF.nope, GNU/Linux DMD supports it too (at least 32-bit version).
Aug 18 2014
On Tuesday, 19 August 2014 at 03:56:38 UTC, ketmar via Digitalmars-d-learn wrote:On Tue, 19 Aug 2014 03:37:23 +0000 Vladimir Panteleev via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:Hmm, I believe I've been lied to, then!And Windows. Since, apparently, pragma(lib) is only supported by COFF and OMF.nope, GNU/Linux DMD supports it too (at least 32-bit version).
Aug 19 2014
On Tuesday, 19 August 2014 at 02:24:48 UTC, ketmar via Digitalmars-d-learn wrote:On Tue, 19 Aug 2014 09:56:30 +0900 Andrew Edwards via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:Actually, that's exactly what I did.or you can add pragma(lib, "curl"); to your source file if you are using dmd.Add '-L-lcurl' to your dmd invocation to do this.Okay, got it. Thank you much.
Aug 18 2014