- 表现:
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
本文介绍了解决在Windows平台上使用libcurl时遇到的链接错误问题。通过调整项目属性中的链接器设置和预处理器定义,成功解决了未解析外部符号的问题。
2363

被折叠的 条评论
为什么被折叠?



