Write an http request from c++ using libcurl

Assignment Help C/C++ Programming
Reference no: EM131134754

Write an HTTP request from C++ using libcurl.

Using Windows 7 (64-bit) + eclipse MARS (64-bit ) + curl 7.40.0 (64-bit). I configured the Include (-I) and Library (-L) in Compiler (GCC C++ Compiler) and Linker (MinGW).

However, I keep getting "undefined reference to `_imp__curl_easy_init'" error.

Below is the code:

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

int main() {
CURL *curl;
std::cout << "Before";
curl = curl_easy_init();
std::cout << "After";
return 0;
}
Here i keep getting "undefined reference to `_imp__curl_easy_init'" error for curl 7.40.0 (64-bit).

Later I downloaded, curl 7.19.3-win32 version and tried same settings for Include and Library. This time, there are no compilation errors but the code terminates automatically without any errors.

With curl 7.19.3-win32 version, In the above code nothing is printed on console and program terminates.

If I comment out line ‘curl =
curl_easy_init();' both couts are printed.

I am using Windows 7 + eclipse MARS, both 64-bit.

Reference no: EM131134754

Questions Cloud

Compose a persuasive thesis about a dc comicssuper : Compose a persuasive thesis about a DC Comicssuper-hero (not a villain) which is approximately 100 words written in the present tense. The thesis mustconnect an aspect [only one] of the character (i.e. origins, powers, personality, creators, symbolis..
What are the relative fitnesses of the three genotypes : In controlled experiments with different genotypes of an insect, a researcher has measured the probability of survival from fertilized egg to mature, breeding adults. what are the relative fitnesses of the three genotypes
Effective job interviewing techniques : The purpose of this assessment is to review an article and identify effective interviewing techniques that you intend to use in your mock interview.
Explain why you selected each specific measurement : Explain why you selected each specific measurement. What are measurements associated with returns and activity ratios? Provide an analysis of the utilization of assets in terms of efficiency (or inefficiency).
Write an http request from c++ using libcurl : Write an HTTP request from C++ using libcurl - his time, there are no compilation errors but the code terminates automatically without any errors.
Why was the federal reserve system set up with regional bank : Why was the Federal Reserve System set up with 12 regional banks rather than one central bank as in other countries? Why was it made an independent quasi-governmental body and not a direct part of the federal government?
Compare financial products available on international market : Compare the financial products available on international markets. Devise and apply appropriate strategies using derivatives to manage currency risk.
Discuss aristotle theory of the soul in the de anima : Compare and Contrast Aristotle and Averroes on the soul, Discuss Aristotle's metaphysics; what is metaphysics about; what is its subject matter and primary concern?
List all the elements in this piece of dna that act in cis : ) List all the elements in this piece of DNA that act in cis. List all the elements in this piece of DNA that act in trans? Where would the mutation occur in the IS situation? Would the IS mutation act in cis or in trans

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd