如何静态链接libcurl与dev c ++? [英] How to statically link libcurl with dev c++?
问题描述
最近我试图链接libcurl与dev c ++ statically.I链接所有.a文件,除了libcurldll.a文件来自libcurl和我定义CURL_STATICLIB。但我收到一些链接器错误。然后我搜索google的这个链接器错误的解决方案,我发现libwsock32.a应该链接。最后我链接libwsock32.a。但是我仍然收到不同的链接器错误...错误是像....
[链接器错误] _imp__ldap_set_optionA'
[链接器错误]未定义的引用`_imp__ldap_initA'
[链接器错误]未定义引用`_imp__ldap_set_optionA'
[链接器错误]未定义引用`_imp__ldap_simple_bind_sA'
[错误]未定义引用`_imp__ldap_search_sA'
[链接器错误]未定义引用`_imp__ldap_first_entry'
[链接器错误]未定义引用`_imp__ldap_get_dnA'
[链接器错误]未定义引用`_imp__ldap_first_attributeA'
[链接器错误]未定义引用`_imp__ldap_get_values_lenA'
[链接器错误]未定义引用`_imp__ldap_value_free_len'
[链接器错误]未定义引用`_imp__ldap_memfreeA'
[未定义引用`_imp__ldap_next_attributeA'
[链接器错误]未定义引用`_imp__ldap_memfreeA'
[链接器错误]未定义引用`_imp__ldap_next_entry'
[链接器错误]未定义引用`_imp__ldap_err2stringA'
[Linker错误]未定义引用`_imp__ldap_unbind_s'
[链接器错误]未定义引用`_imp__ldap_msgfree'
等等.........
我也在google搜索这个链接器错误,但没有找到。 Plzzzz给我一个解决方案为什么我收到这个链接器错误????
解决方案对于Windows和Mingw gcc或g ++,add
libwldap32.a 链接器,
字面上它是一个
-lwldap32
链接器选项。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????
解决方案For Windows and Mingw gcc or g++, add libwldap32.a to linker, literally it is a -lwldap32 linker option.
这篇关于如何静态链接libcurl与dev c ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!