using curl on mingw

1. download curl for mingw:
http://curl.haxx.se/gknw.net/7.28.1/dist-w32/curl-7.28.1-devel-mingw32.zip


2.build the sample in curl-7.28.1-devel-mingw32.zip
Makefile.m32 is not working, so try the following instead:
gcc -I. -I.. -I../include -I"../lib" -I"../lib/include" -g -O2 -fno-strict-aliasing -DCURL_STATICLIB -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H -DHAVE_LIBZ -DHAVE_ZLIB_H -DUSE_LIBIDN -DUSE_WINDOWS_SSPI -c chkspeed.c
gcc -s -o chkspeed.exe chkspeed.o  -L../lib -lcurl -L../lib/win32 -lssh2 -L../lib -lz -L../lib/lib -lidn -lrtmp -lcrypto -lssl -lwldap32 -lws2_32 -lwinmm


3.run chkspeed.exe
At first, I run chkspeed.exe on shell, and it Immediately Crashes on Startup. try gdb chkspeed.exe, and get something like gdb: unknown target exception 0xc0000135 at 0x7c974ed1(http://cygwin.com/ml/cygwin/2007-07/msg00464.html). google it, and get some interesting info:
http://cygwin.com/ml/cygwin/2007-07/msg00541.html
http://www.cygwin.com/ml/cygwin/2004-09/msg01101.html
http://www.cygwin.com/ml/cygwin/2004-10/msg01052.html
but the solution doesn't work at all.


I then happen to double click the exe, and get missing-some-dll warning, and those dlls are in curl-7.28.1-devel-mingw32.zip/bin. So, more the exe into bin, it works!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值