静的curlppライブラリを使用してVS2008でC++コンソールアプリを構築しようとしています。コード(curlppの例00)は次のとおりです。
#include "stdafx.h"
#include <curlpp/curlpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
using namespace curlpp::options;
int main(int, char **)
{
try
{
// Our request to be sent.
curlpp::Easy myRequest;
// Set the URL.
myRequest.setOpt<Url>("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 << e.what() << std::endl;
}
catch(curlpp::LogicError & e)
{
std::cout << e.what() << std::endl;
}
return 0;
}
ソースをダウンロードし、インクルードパスがソースインクルードファイルを指しているのですが、コンパイルしようとすると、次のタイプのインラインファイルで大量のエラーが発生します。
dllimport関数の定義は許可されていません
確かに多くの人がvs2008でcurlppを使用していて、私は明らかな何かを見逃しています。