Windows上的libcurl的静态库 [英] Static library of libcurl on windows

查看:1028
本文介绍了Windows上的libcurl的静态库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将这个库libcurl静态链接到exe?我试过了

- disable-share --enable-static不起作用。



我是使用MingW32



有没有一种简单的方法来静态链接这个库,所以我可以没有更多的.dll与我的应用程序?

解决方案

如果使用代码块,请右键单击您的项目并按属性,然后在定义选项卡上添加:

CURL_STATICLIB



如果使用命令行,则:

-static -static-libgcc -static-libstdc ++ -DCURL_STATICLIB -lcurl -lws2_32 -lwinmm


How to link this library libcurl statically to the exe? i have tried

--disable-share --enable-static that does not help.

I am using MingW32

Is there an easy way to statically link this library so i can have no more .dlls with my app?

解决方案

If using codeblocks, right click your project and press properties then on the defines tab, add:

CURL_STATICLIB

if using command line then:

-static -static-libgcc -static-libstdc++ -DCURL_STATICLIB -lcurl -lws2_32 -lwinmm

这篇关于Windows上的libcurl的静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆