cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Error with Static Linking

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 18 May 2007 11:27:31 -0700

On Fri, May 18, 2007 at 07:44:38PM +0000, Kamil Porembinski wrote:
> I compiled curl 7.16.2 --without-ssl. When I try to compile my application I
> se this error:
...]
> /usr/src/curl-7.16.2/lib/strerror.c:682: undefined reference to
> `idna_strerror'
> collect2: ld returned 1 exit status
> make: *** [sysinfo-static] Błąd 1
>
> curl-config --libs return only -lcurl
>
> I have g++ (GCC) 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
>
> What is wrong? I complie this application at FreeBSD 6.2 and everything is
> okey.

curl-config is only valid when compiling applications against the installed
version of libcurl, which in this case looks like it's the shared library.
If you want to link against a different library, you're on your own.
Ideally, curl-config would have a different option (like --static-libs)
for this kind of application. You could use pkg-config instead of
curl-config for your app, which does have an option for static libs.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-05-18