cURL / Mailing Lists / curl-library / Single Mail


Re: Curl library problem - symbols not found

From: Patrick MONNERAT <>
Date: Wed, 06 Aug 2008 17:44:28 +0200

On Wed, 2008-08-06 at 10:39 -0400, Patrick Galbraith wrote:

> >
> >> If anyone on this list would, could, be interested in trying these out
> >>
> > and seeing if I"m missing something (particularly with compile, autoconf
> > issues), I could gladly send the source.

I think I've found it:

1) Your file uses macro LIBCURL_CHECK_CONFIG from included
file config/ac_curl.m4.This macro defines libcurl cflags in variable
LIBCURL_CPPFLAGS and libs in LIBCURL (see header comment in this file).
2) Still in, you define with AC_SUBST variables
CURL_CONFIG, CURL_INC and CURL_LIBS that are never initialized.
3) In src/, you use CURL_INC (uninitialized, thus empty
string) as cflags (in INCLUDES definition) and as additional libraries
(?) in curl_functions_mysql_la_LIBADD definition --> both have NULL

My solution: get rid of CURL_CONFIG, CURL_INC and CURL_LIBS (suppress
AC_SUBSTs), replace their references by the appropriate symbol according
to macro LIBCURL_CHECK_CONFIG. That is (in src/
curl_functions_mysql_la_LIBADD = ... $(LIBCURL)

I did not check if there are other references like that in other files:
I let you do it. But the fix listed above produces a shared library that
has no undefined symbol.

Little trick: if you examine the link command listed at "make" time, you
would have noticed that "-lcurl" was not listed... thus not linked !

Good luck and success for the follow-up.
Received on 2008-08-06