windows平台,使用libcurl,编译(link阶段)时遇到:
VS报错
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
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
- 解决方法:
项目属性->link->input:
libcurl.lib ws2_32.lib winmm.lib wldap32.lib
项目属性->C/C++->Preprocessor->Definitions 增加:
BUILDING_LIBCURL
HTTP_ONLY