how to use libcurl

Jun 20, 2012 at 11:11am
I want to use the libcurl library,but I can't find any tutorial.
Jun 20, 2012 at 12:33pm
On the libcurl homepage, there is a link marked "tutorial".
Jun 20, 2012 at 2:33pm
you can write some code yourself,it's easy.
If you really want to use curl,u can see the source,include the header,and use the function of the interface.I do not think it's difficult.
Jun 20, 2012 at 2:37pm
here is the link include some example.
http://curl.haxx.se/libcurl/c/example.html
Jun 21, 2012 at 1:19am
when I copy that example code,the compiler display undefined the function curl_easy_init() etc.

I doubt that whether I install the library.
Jun 21, 2012 at 2:36am
You need to include the header file: curl.h, after you run yum/apt-get to install curl library
Jun 21, 2012 at 7:29am
how to install curl library ?
Jun 21, 2012 at 9:04am
get the source code ,
where you are using gcc,pls link the static lib.
if not ok,email me:edgarymr AT gmail
Jun 21, 2012 at 10:46am
Is it so hard to explain how to link a library on the forum instead of doing via e-mail?

Also, undefined reference, when using external libreries, most times mean you didn't link a library file correctly.
Last edited on Jun 21, 2012 at 10:46am
Jun 24, 2012 at 4:29am
I'm new to c++ and libcurl too. Someone from other forum told me to look into /usr/share/doc/libcurl-devel-7.18.1/ , there's a lot of libcurl examples.

To compile the source add -lcurl parameter

e.g : g++ my.c -o my.o -lcurl
Topic archived. No new replies allowed.