curl-users
Re: undefined reference to `curl_global_init'
Date: Fri, 10 Feb 2012 22:49:26 +0100
On Sat, Feb 11, 2012 at 02:04:43AM +0800, Hello! hello wrote:
> I encounter a problem while compile attached sourcecode which require libcurl
>
> From following log generated by ld, libcurl.so was loaded, definition of
> 'curl_global_init' was also there,
> but the compiler still complain without any success
>
> Thanks for any help
>
> Package for libcurl:
> libcurl4-openssl-dev
>
> Compile Command:
> gcc -L/usr/lib/i386-linux-gnu -lcurl -Wl,-M,-t,-y,curl_global_init
> couch_example1.c
The reference to -lcurl must come after the file the references it. The
order of appearance on the command-line is important.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-10