cURL / Mailing Lists / curl-library / Single Mail

curl-library

gcc compile problem under ubuntu

From: Alexandre BM <salexandre.bm_at_gmail.com>
Date: Wed, 20 Jun 2012 16:49:34 +0100

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
           Multi-protocol file transfer library (NSS)
ii libcurl4-openssl-dev 7.22.0-3ubuntu4
           Development files and documentation for libcurl (OpenSSL)
ii python-pycurl 7.19.0-4ubuntu3
           Python bindings to libcurl

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-20