卷曲链接问题

Curl link issue

本文关键字:问题 链接      更新时间:2023-10-16

在实现程序来发布和读取网页数据(以C++为单位)时,我在编译过程中收到以下链接curl错误:

error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function "public: __thiscall WebBrowser::WebBrowser(struct HWND__ *)" (??0WebBrowser@@QAE@PAUHWND__@@@Z)
error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function "public: __thiscall WebBrowser::WebBrowser(struct HWND__ *)" (??0WebBrowser@@QAE@PAUHWND__@@@Z)
error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function "public: __thiscall WebBrowser::WebBrowser(struct HWND__ *)" (??0WebBrowser@@QAE@PAUHWND__@@@Z)
error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function "public: __thiscall WebBrowser::WebBrowser(struct HWND__ *)" (??0WebBrowser@@QAE@PAUHWND__@@@Z)

我正在使用Visual Studio 2008,并使用此命令来构建:

nmake /f Makefile.vc mode=static WITH_SSL=static WITH_DEVEL=C:OpenSSL-Win32 VC=X ENABLE_SSPI=no ENABLE_IDN=no ENABLE_WINSSL=no DEBUG=no MACHINE=x86 GEN_PDB=no ENABLE_IPV6=yes

值得注意的是,我使用 2015 Visual Studio 来构建包7.47.0

在项目配置对话框中添加库:

Project->Properties (or Alt+F7),->Configuration properties->Linker->Input->Additional library dependencies.
Project->Properties (or Alt+F7),->Configuration properties->Linker->General->Additional library directories

如何解决此问题?

库链接不正确。错误如下所示:使用 libcurl 链接程序时未解析的符号