VS2008中使用libcurl库在编译时遇到的LNK2001问题

  • 表现:

 

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
  
  • 解决方法:

项目属性->link->input:

libcurl.lib ws2_32.lib winmm.lib wldap32.lib

 

项目属性->C/C++->Preprocessor->Definitions 增加:

 

BUILDING_LIBCURL

HTTP_ONLY


你可能感兴趣的:(windows,平台)