How do I solve these libcurl linking errors?(如何解决这些 libcurl 链接错误?)
问题描述
我在 linux 上没有这个问题,所以我不知道为什么会在 windows 上发生这种情况.我已经用 google 搜索过了,除了邮件列表存档之外没有找到任何东西,并回复说google it".
I don't have this problem on linux so I don't know why this happens on windows. I googled it already and didn't find anything except mailing list archives with the same question and reply saying "google it".
我正在使用 mingw.我在构建 libcurl 时确实收到了一些链接器警告,但它们似乎与 ssl 相关,而且我不知道这是否很重要,因为它构建时没有错误.
I'm using mingw. I did get some linker warnings when I built libcurl but they seemed to be ssl related and I don't know if it's a big deal because it built without errors.
推荐答案
通过添加选项 -lcurl.dll
,我能够避免 windows (mingw win32) 上的这些 curl 链接错误.-DCURL_STATICLIB
在我的情况下不需要.
I was able to avoid these curl linking errors on windows (mingw win32) by adding option -lcurl.dll
. -DCURL_STATICLIB
was not needed in my case.
我的构建在 mingw/lib 文件夹中有两个 libcurl 文件:libcurl.a 和 libcurl.dll.a
My build has two libcurl files in mingw/lib folder: libcurl.a and libcurl.dll.a
这篇关于如何解决这些 libcurl 链接错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!