0
我在编码方面有点新鲜。我想将libcurl库添加到我的visual studio项目中,我认为我做对了,但我不确定。我怎么过有头一些错误遗漏添加卷曲库C++
#include <curl/curl.h>
#include <libxml/HTMLparser.h>
我添加库引用 - >管理的NuGet包 - >和libcurl.net库
但我仍然有编译错误。还我一个警告过可能的问题是在警告来自
Severity Code Description Project File Line Suppression State
Warning The 'packages' element is not declared. Project3 C:\Users\Pc\Documents\Visual Studio 2015\Projects\Project3\Project3\packages.config 2
这里是我的代码的某些部分
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <curl/curl.h>
#include <libxml/HTMLparser.h>
//
// Case-insensitive string comparison
//
#ifdef _MSC_VER
#define COMPARE(a, b) (!_stricmp((a), (b)))
#else
#define COMPARE(a, b) (!strcasecmp((a), (b)))
#endif
//
// libxml callback context structure
//
struct Context
{
Context() : addTitle(false) { }
bool addTitle;
std::string title;
};
//
// libcurl variables for error strings and returned data
static char errorBuffer[CURL_ERROR_SIZE];
static std::string buffer;
我也发现很多相同的主题和阅读他们很好,但我不知道知道我的问题在哪里。
对于另一个问题,我的目标是从一个在线页面获得一个简单的字符串!你知道一个更好,更简单的方法来获得一个字符串?
am我以真实的方式添加库? – Ragnaros