sam Cheng wrote:
> Dear all
> I try to use libcurl in my project. I use a Linux project
> generator to create a new program and change the main.c to below
> program. After compile, There are some error in my project. It's
> "Undefined reference to 'curl_easy_init', How do i do?
1. sudo yum install -y libcurl-devel
2. gcc `pkg-config --cflags --libs libcurl` curl.c
You need to add dependency into your project.
> #include <stdio.h>
> #include <curl/curl.h>
> int main(void)
> {
> CURL *curl;
> curl = curl_easy_init();
> if(curl)
> {
> curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
> curl_easy_cleanup(curl);
> }
> }
Regards,
Zhenhua
_______________________________________________
Moblin dev Mailing List
[email protected]
To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org
once logged in.
For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists