error when attempting unittest
Jonathan M Davis
jmdavisProg at gmx.com
Sat Mar 23 18:56:21 PDT 2013
On Sunday, March 24, 2013 01:03:40 Patrick Tinkham wrote:
> When I try to compile a unittest on the following:
>
> import std.stdio;
> class A {
> int x = 42;
> }
>
> unittest {
> auto a1 = new A;
> assert (a1.x == 42);
> auto a2 = a1;
> a2.x = 100;
> assert (a1.x == 100);
> }
>
> I get the following:
>
> patrick at patrick-desktop:~/d$ rdmd --main -unittest c.d
> /usr/bin/ld: cannot find -lcurl
> collect2: ld returned 1 exit status
> --- errorlevel 1
> patrick at patrick-desktop:~/d$
>
>
> I assume that I am missing something. But what?
That's a linker error telling you that the linker can't find libcurl, which
means that you haven't installed curl or that it's not installed somewhere
where the linker looks. Given that curl is something that should normally be
installed on a Linux box and would be installed by the system's package
manager, my guess is that you don't have curl installed - or that if you do,
you don't have the devel package installed (if your distro has separate devel
packages).
- Jonathan m Davis
More information about the Digitalmars-d-learn
mailing list