News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Using libcurl in Codeblocks

Started by qweet, May 05, 2016, 12:01:02 PM

Previous topic - Next topic

qweet

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.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]