使用 Mingw 编译器构建curl lib

发布于 2025-01-19 21:02:55 字数 1555 浏览 1 评论 0原文

我想在我的项目中使用curl lib(Windows 上的c++ QT Creator),我从网站下载zip lib文件 https://curl.se/download.html(版本 7.82.0) 我想使用 Makefile 和这个命令来构建它 mingw32-make mingw32 如文档中所述 https://curl.se/ docs/install.html

但不幸的是,我收到一个错误

mingw32-make mingw32
[....]
gcc   -s -m32 -static -o curl.exe curl.res slist_wc.o tool_binmode.o tool_bname.o 
tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_wrt.o 
tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o 
tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o 
tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o 
tool_panykey.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_strdup.o tool_setopt.o 
tool_sleep.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o 
tool_xattr.o strtoofft.o nonblock.o warnless.o curl_ctype.o curl_multibyte.o version_win32.o 
dynbuf.o -L../lib -lcurl -lwldap32 -lws2_32
../lib\libcurl.a: error adding symbols: Archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
make[1]: *** [curl.exe] Fehler 1
make[1]: Leaving directory `D:/Dev/API/curl-7.82.0/src'
make: *** [mingw32] Fehler 2

,我尝试运行 ranlib lib\libcurl.a 但问题仍然存在,

有人知道吗?

还有一个问题:是否也可以使用 mingw64 来构建它?

I want to use the curl lib in my project (c++ QT creator on windows), I download the zip lib file from the website https://curl.se/download.html (Version 7.82.0)
and I wanted to build it using the Makefile with this commend
mingw32-make mingw32 as described in the documentation https://curl.se/docs/install.html

but unfortunately, I am getting an error

mingw32-make mingw32
[....]
gcc   -s -m32 -static -o curl.exe curl.res slist_wc.o tool_binmode.o tool_bname.o 
tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_wrt.o 
tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o 
tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o 
tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o 
tool_panykey.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_strdup.o tool_setopt.o 
tool_sleep.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o 
tool_xattr.o strtoofft.o nonblock.o warnless.o curl_ctype.o curl_multibyte.o version_win32.o 
dynbuf.o -L../lib -lcurl -lwldap32 -lws2_32
../lib\libcurl.a: error adding symbols: Archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
make[1]: *** [curl.exe] Fehler 1
make[1]: Leaving directory `D:/Dev/API/curl-7.82.0/src'
make: *** [mingw32] Fehler 2

I tried to run ranlib lib\libcurl.a but the issue is still there,

does anyone have an idea about it?

One more question: is it possible also to build it with mingw64?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文