curl-library
Curl library problem - symbols not found
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:
mysql> CREATE FUNCTION http_get RETURNS STRING SONAME
"curl_functions_mysql.so";ERROR 1126 (HY000): Can't open shared library
'curl_functions_mysql.so' (errno: 22 /usr/lib/curl_functions_mysql.so:
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/libcurl.so
nm: /usr/lib/libcurl.so: 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
<snip>
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 UpanishadReceived on 2008-08-05