Jump to content

Recommended Posts

Hi all,

I'm trying to work with the curl library to make an HTTP request in C++; however, I keep getting the error "undefined reference to `__imp__curl_easy_init'"

 

This is my code thus far:

#include <string>
#include <iostream>
#include <fstream>
#include <windows.h>
#include <curl/curl.h>

using namespace std;

int main()
{
    //some other stuff that I'm doing...not really important; works fine.

    CURL* curl = curl_easy_init(); //this line giving the error
}

I don't know if anyone else here uses the curl library...some help would be awesome. Google yields no answers that I can find; either that or I'm just unworthy.

 

I've also tried following the curl documentation here but fail to understand...kind of embarrassing :P

 

So yeah, thanks in advance :)

Link to comment
https://forums.phpfreaks.com/topic/161211-curl-in-c/
Share on other sites

I think it's something to do with my curl files. I just copied the includes to my includes dir for codeblocks, but I think that's where the error is.

 

Does anyone know how to install/compile/copy the right files or whatever?

 

This is the most irritating thing in the world...I've been searching for hours...

Link to comment
https://forums.phpfreaks.com/topic/161211-curl-in-c/#findComment-850731
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.