如何将 libcurl 与 dev c++ 静态链接?

发布于 2024-11-29 17:38:48 字数 1393 浏览 0 评论 0原文

最近我尝试将 libcurl 与 dev c++ 静态链接。我链接了除来自 libcurl 的 libcurldll.a 文件之外的所有 .a 文件,并且我定义了 CURL_STATICLIB 。但我收到了一些链接器错误。然后我在谷歌上搜索了这个链接器错误的解决方案,在那里我发现应该链接“libwsock32.a”。最后我链接了 libwsock32.a。但我仍然收到不同的链接器错误...错误就像...

[Linker error] undefined reference to `_imp__ldap_set_optionA' 
[Linker error] undefined reference to `_imp__ldap_initA' 
[Linker error] undefined reference to `_imp__ldap_set_optionA' 
[Linker error] undefined reference to `_imp__ldap_simple_bind_sA' 
[Linker error] undefined reference to `_imp__ldap_search_sA' 
[Linker error] undefined reference to `_imp__ldap_first_entry' 
[Linker error] undefined reference to `_imp__ldap_get_dnA' 
[Linker error] undefined reference to `_imp__ldap_first_attributeA' 
[Linker error] undefined reference to `_imp__ldap_get_values_lenA' 
[Linker error] undefined reference to `_imp__ldap_value_free_len' 
[Linker error] undefined reference to `_imp__ldap_memfreeA' 
[Linker error] undefined reference to `_imp__ldap_next_attributeA' 
[Linker error] undefined reference to `_imp__ldap_memfreeA' 
[Linker error] undefined reference to `_imp__ldap_next_entry' 
[Linker error] undefined reference to `_imp__ldap_err2stringA' 
[Linker error] undefined reference to `_imp__ldap_unbind_s' 
[Linker error] undefined reference to `_imp__ldap_msgfree' 

等等.........

我还在谷歌中搜索了此链接器错误,但没有找到。请给我一个解决方案,为什么我收到此链接器错误???

Recently I am trying to link libcurl with dev c++ statically.I linked all the .a files except libcurldll.a file which came from libcurl and I defined CURL_STATICLIB . But I received some linker errors. Then I searched google for the solution of this linker error, there I found that "libwsock32.a" should be linked. And finally I linked libwsock32.a. But I am still receiving different linker errors... Errors are like....

[Linker error] undefined reference to `_imp__ldap_set_optionA' 
[Linker error] undefined reference to `_imp__ldap_initA' 
[Linker error] undefined reference to `_imp__ldap_set_optionA' 
[Linker error] undefined reference to `_imp__ldap_simple_bind_sA' 
[Linker error] undefined reference to `_imp__ldap_search_sA' 
[Linker error] undefined reference to `_imp__ldap_first_entry' 
[Linker error] undefined reference to `_imp__ldap_get_dnA' 
[Linker error] undefined reference to `_imp__ldap_first_attributeA' 
[Linker error] undefined reference to `_imp__ldap_get_values_lenA' 
[Linker error] undefined reference to `_imp__ldap_value_free_len' 
[Linker error] undefined reference to `_imp__ldap_memfreeA' 
[Linker error] undefined reference to `_imp__ldap_next_attributeA' 
[Linker error] undefined reference to `_imp__ldap_memfreeA' 
[Linker error] undefined reference to `_imp__ldap_next_entry' 
[Linker error] undefined reference to `_imp__ldap_err2stringA' 
[Linker error] undefined reference to `_imp__ldap_unbind_s' 
[Linker error] undefined reference to `_imp__ldap_msgfree' 

And so on.........

I also searched for this linker errors in google but nothing found. Plzzzz give me a solution why I am receiving this linker errors????

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蘑菇王子 2024-12-06 17:38:48

对于 Windows 和 Mingw gcc 或 g++,添加
libwldap32.a 到链接器,
从字面上看,它是一个
-lwldap32
链接器选项。

For Windows and Mingw gcc or g++, add
libwldap32.a to linker,
literally it is a
-lwldap32
linker option.

陈甜 2024-12-06 17:38:48

看起来您需要链接到 ldap。您还应该考虑不使用 Dev-C++,而使用积极开发的高质量 IDE,例如 Eclipse CDT

Looks like you need to link with ldap. You should also consider not using Dev-C++, and use an actively developed, high quality IDE like Eclipse CDT

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文