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

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  After the array is created and loaded

After the array is created and loaded, the problem is then to sort the array and print out the contents of the sorted array. Please use a separate function for the sort routine and also a separate function for the print out of the array.

  Output the even numbers from 1 to 10 in ascending order

Output the even numbers from 1 to 10 in ascending order, then the odd numbers from 10 to 1 in descending order: 2 4 6 8 10 9 7 5 3 1. in C++

  You will implement a simplified version of the set class

you will implement a simplified version of the set class. you must implement all functions defined in the provided file

  Design a nested program

How many levels of nesting are there in this design?

  Can you have an array of arrays

What are the purposes of the following three functions? How would you use them in your programs? Hint: In relation to buffers.

  What is the output of the following code

What is the output of the following code

  Prepare a c function that returns the number of elements

Prepare a C function that returns the number of elements smaller than 3.0 in an array - make a function returns the number of elements.

  The factorial of a positive integer n, denoted by n!

Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....

  Design a cruiseship class that is derived from ship class

SEN 970 Object-Oriented Programming in Objective-C. Demonstrate the classes in a program that has an array of ship pointers. The array elements should be initialized with the addresses of dynamically allocated Ship, CruiseShip and CargoShip objects..

  The minimal spanning tree algorithm

discuss the minimal spanning tree algorithm. Describe the advantages and disadvantages of this algorithm. List the circumstances best suited for the minimal spanning tree algorithm.

  Evaluate the circumference of a circle

Write a program that will call a function to calculate the area of a circle, and call another function to calculate the circumference of a circle.

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