cURL / Mailing Lists / curl-library / Single Mail


Curl library problem - symbols not found

From: Patrick Galbraith <>
Date: Tue, 05 Aug 2008 09:09:12 -0400

Hi all,

I'm working on a book about MySQL/Perl, etc, and writing a demonstration
of how to write a MySQL UDF. I wanted to use libcurl and write a simple
function called http_get(). I have the program compile and everything
looks good, but when I run:

"";ERROR 1126 (HY000): Can't open shared library
'' (errno: 22 /usr/lib/
undefined symbol: curl_easy_setopt)

When I run nm on my library, I get:

                 U curl_easy_cleanup
                 U curl_easy_init
                 U curl_easy_perform
                 U curl_easy_setopt
                 U curl_global_init

And then:

patg_at_hanuman:~/wrox/code$ nm /usr/lib/
nm: /usr/lib/ no symbols

Also, if I write a simple program (the example on the curl site) and
compile it using the same flags, it works, but running nm on the program
shows the functions are undefined:

patg_at_hanuman:~/wrox/code$ nm curlex1


                 U curl_easy_cleanup@@CURL_GNUTLS_3
                 U curl_easy_init@@CURL_GNUTLS_3
                 U curl_easy_perform@@CURL_GNUTLS_3
                 U curl_easy_setopt@@CURL_GNUTLS_3

Am I missing something obvious here?

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad
Received on 2008-08-05