在使用静态库的时候,出现一下错误
error LNK2001: unresolved external symbol __imp__curl_easy_perform
error LNK2001: unresolved external symbol __imp__curl_easy_setopt
error LNK2001: unresolved external symbol __imp__curl_easy_init
error LNK2001: unresolved external symbol __imp__curl_easy_cleanup
解决办法:
项目属性->C/C++->Preprocessor->Definitions 增加:BUILDING_LIBCURL
#include "curl/curl.h"
#pragma comment(lib, "libcurl.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "wldap32.lib")