cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Undefined curl symbols while loading the library

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 1 Jul 2008 16:33:25 -0500

On Tue, Jul 1, 2008 at 4:03 PM, Scoped Ptr <scoped.ptr_at_gmail.com> wrote:

> I am trying to dynamically link libcurl.so to my program and had not been
> able to do that despite doing everything what is required.

Everything?

> When I did ld on my app library, it gives me all undefined references for
> cURL functions.

Why would you run ld on a library? do you mean ldd?

> I checked and there are libcurl.so links pointing to libcurl.so.4.1.0 in
> both the /usr/lib and /usr/local/lib. The application compiles successfully
> but its not able to load my program which links to libcurl.

You should also have a symlink named libcurl.so.4

> I see so many people also faced the same situation

Really? I read this list fairly often and very rarely see reports of any
linkage problems (except maybe on Windows)

> Any suggestions?

Try running the "ldconfig" command (as root)

Also, check to see if you can execute the curl command line tool.

If so, compare the output of "ldd /path/to/curl" with
the output of "ldd /path/to/your-app"

Another thing you might want to consider is using either curl-config or
pkg-config to automatically set up the proper linker options, instead of
entering them manually.

 - Jeff
Received on 2008-07-01