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

  Details of the files located in the folder

As part of her business activities, Sharon has created a large number of files and folders. Whenever she needs to view the details of the files stored in a folder, Sharon browses to the folder using Windows Explorer.

  Program that converts kilograms into pounds

Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds output both the weights rounded to two decimal places.

  Your city''s parking violation

Your city's Parking Violation Bureau wants you to write a program to compute fines for parking violations.

  Write a program that reads a collection of positive numbers

Write a program that reads a collection of positive and negative numbers and multiplies only the positive integers. Loop exit should occur when three consecutive negative values are read.

  A charitable organization wants to design a special atm

A charitable organization wants to design a special ATM machine to be used by needy people.   The association supplies the needy person with a pin number to be able to use the ATM machine.   He/she can then retrieve up to $150 per day depending on..

  When should an attribute of a class be static

Is there ever a reason to have a public attribute in a class?

  Write a c++ program that would take two 3x3 matrix

Write a C++ program that would take two 3x3 matrix and outputs the results of adding, subtracting and multiplying two matrices. Create at least three functions: one that performs addition,

  What are relationship operators

Write a program that print whole numbers from 1 to 15 on the screen USUNG FOR LOOP - Write the same program using while loop.

  Program that generates 50 random numbers of type

Write a program that generates 50 random numbers of type integer ranges from 1 to 1000 and load all the numbers into a C++ vector. The program should then display the largest, the smallest, the sum, and the average values stored in the vector.

  Calculate the volume by formula

Write program in C++ : - write a class VolumeOfBox that calculate the volume by this formula : length * breadth * height this class has three data member ,and the member function which calculates the volume and print the result by using pointer to..

  Questionnbsp the template method pattern and the strategy

questionnbsp the template method pattern and the strategy pattern both abstract some computation in the form of

  Dynamic behavior of the working pointers

Dynamic behavior of the working pointers the four LinkedList Methods: Append(), Display(), Insert(), and Delete() in the Chapter 17 LinkedList Template (LinkedList.h) Version 2

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