Код: Выделить всё
#include
#include
#include
#include
int main() {
return 0;
}
"g++ -std=c++14 -I/usr/nguyenthesang/Desktop/myprogram/curlpp-0.8. 1/include main.cpp", и он успешно компилируется.
Затем я добавляю реализацию в основную функцию (ниже скопировано из репозитория curpp):
Код: Выделить всё
#include
#include
#include
using namespace curlpp::options;
int main(int, char **)
{
try
{
// That's all that is needed to do cleanup of used resources (RAII
style).
curlpp::Cleanup myCleanup;
// Our request to be sent.
curlpp::Easy myRequest;
// Set the URL.
myRequest.setOpt("http://example.com");
// Send request and get a result.
// By default the result goes to standard output.
myRequest.perform();
}
catch(curlpp::RuntimeError & e)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/43541759/how-to-add-library-curlpp-to-c-project[/url]