20 Jun 2012 17:49
gcc compile problem under ubuntu
Alexandre BM <salexandre.bm <at> gmail.com>
2012-06-20 15:49:34 GMT
2012-06-20 15:49:34 GMT
Hello everybody,
I'm trying to compile a c programe that uses libcurl under Ubuntu 12.04,
Libcurl is correctly installed (I hope). but the linking is not working
gcc -lcurl functions.o main.o -o myprogram
I'm gettings these errors :
functions.c:(.text+0x5): undefined reference to `curl_easy_init'
functions.c:(.text+0x23): undefined reference to `curl_easy_setopt'
functions.c:(.text+0x2b): undefined reference to `curl_easy_perform'
functions.c:(.text+0x38): undefined reference to `curl_easy_cleanup'
Does anyone have an idea how can i fix it ?
Thanks ! :)
PS :
dpkg --list | grep curl
ii curl 7.22.0-3ubuntu4
Get a file from an HTTP, HTTPS or FTP server
ii libcurl3 7.22.0-3ubuntu4
Multi-protocol file transfer library (OpenSSL)
ii libcurl3-dbg 7.22.0-3ubuntu4
libcurl compiled with debug symbols
ii libcurl3-gnutls 7.22.0-3ubuntu4
Multi-protocol file transfer library (GnuTLS)
ii libcurl3-nss 7.22.0-3ubuntu4
(Continue reading)
RSS Feed