Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: qweet on May 05, 2016, 12:01:02 pm

Title: Using libcurl in Codeblocks
Post by: qweet on May 05, 2016, 12:01:02 pm
I have this code:

#include <stdio.h>
#include <curl/curl.h>

int main() {
    CURL *curl;
    CURLcode res;

    curl = curl_easy_init();

curl_easy_init() is not found. It looks like I need to proper use libcurl. I only specified the directory in
settings > compiler > search directories > compiler > c:\curl\include

I have a libcurl file named cygcurl-4.dll. Do I need to specify the directory to this path? I thought I need to have *.lib *.a *.h files.

I have this path in settings > compiler > search directories > linker > curl\lib

In this directory there is for ex. a file like: libcurl.rc

I don't have a path in settings > compiler > linker settings.

It is possible with popen to run a curl command in my program. So #include <curl/curl.h> looks to work.

Maybe someone has a solution. A step by step is welcomed, too. Where to download the right libcurl files and how to set up codeblocks that easy libcurl code is running.

I already looked this one up with google but it appears to me that other people had slightly different problems than I have.
Title: Re: Using libcurl in Codeblocks
Post by: oBFusCATed on May 05, 2016, 01:50:25 pm
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_What_do_I_need_to_know_when_using_3rd_party_libs.3F