资源简介
附件中文件解压后可直接使用,win7 ,gcc 4.9.2以上编译。
编译过程中libcurl, zlib未作修改
openssl更改了test下几个文件,使用tdm-gcc 5.1.0编译
libssh2在github上下的源码,更改openssl.h文件,使用cmake编译
libcurl使用lib下makefile.m32文件编译。
注意:这几个库调用是一定要注意顺序,否则link会报错,具体可参照附件中的一个实例,实例采用codeblocks组织。
代码片段和文件信息
/**
* File: w3G.c
* libcurl is an open source lib for url.
*
* Copyright: (c) T-ware Inc.
*
* Function: get 3G data from internet
*
* Author: Tody Guo
* Date: 2013-10-06
*
**/
//#include “stdafx.h“
#include
#include
#include
//#pragma comment(lib “libcurl.lib“)
void oops(char *msg)
{
fprintf(stderr “%s\nReturn code: 1“ msg);
exit(1);
}
size_t write_data(void *buffer size_t size size_t nmemb void *user_p)
{
FILE *f = (FILE *) user_p;
size_t return_size = fwrite(buffer size nmemb f);
return return_size;
}
int main(int argc char* argv[])
{
CURL *curl;
CURLcode resCode;
FILE *fp =NULL;
char url[256]=“www.baidu.com“;
printf(“Version: %s\n“ curl_version());
if (argc>=2)
{
strncpy(url argv[1] 256);
}
curl = curl_easy_init();
if (NULL==curl)
oops(“init failed!“);
curl_easy_setopt(curl CURLOPT_URL url);
if (argc == 3)
{
fp = fopen(argv[2] “wb+“);
if (fp==NULL)
oops(“open file failed“);
curl_easy_setopt(curl CURLOPT_WRITEFUNCTION write_data);
curl_easy_setopt(curl CURLOPT_WRITEDATA fp);
fprintf(stderr “Saving to file(%s)...“ argv[2]);
}
resCode = curl_easy_perform(curl);
if (resCode!=0)
oops((char *)curl_easy_strerror(resCode));
curl_easy_cleanup(curl);
if(fp != NULL)
fclose(fp);
fprintf(stderr “\nReturn code: 0“);
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-07-21 14:21 libcurl(with openssl libz libssh2)\
目录 0 2015-07-21 14:24 libcurl(with openssl libz libssh2)\include\
目录 0 2015-07-21 14:22 libcurl(with openssl libz libssh2)\include\curl\
文件 89830 2015-06-13 06:20 libcurl(with openssl libz libssh2)\include\curl\curl.h
文件 7318 2015-07-19 13:35 libcurl(with openssl libz libssh2)\include\curl\curlbuild.h
文件 8934 2015-04-23 18:09 libcurl(with openssl libz libssh2)\include\curl\curlrules.h
文件 3075 2015-06-17 13:57 libcurl(with openssl libz libssh2)\include\curl\curlver.h
文件 3472 2015-04-23 18:09 libcurl(with openssl libz libssh2)\include\curl\easy.h
文件 2565 2015-06-03 15:38 libcurl(with openssl libz libssh2)\include\curl\mprintf.h
文件 14947 2015-06-12 20:57 libcurl(with openssl libz libssh2)\include\curl\multi.h
文件 1330 2015-04-23 18:09 libcurl(with openssl libz libssh2)\include\curl\stdcheaders.h
文件 37557 2015-06-12 01:50 libcurl(with openssl libz libssh2)\include\curl\typecheck-gcc.h
文件 49978 2015-07-02 19:09 libcurl(with openssl libz libssh2)\include\libssh2.h
文件 3563 2015-07-21 11:44 libcurl(with openssl libz libssh2)\include\libssh2_config.h
文件 36010 2015-07-02 19:09 libcurl(with openssl libz libssh2)\include\libssh2_priv.h
文件 4910 2015-07-02 19:09 libcurl(with openssl libz libssh2)\include\libssh2_publickey.h
文件 15716 2015-07-02 19:09 libcurl(with openssl libz libssh2)\include\libssh2_sftp.h
目录 0 2015-07-21 14:22 libcurl(with openssl libz libssh2)\include\openssl\
文件 6182 2015-07-21 09:44 libcurl(with openssl libz libssh2)\include\openssl\aes.h
文件 63142 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\asn1.h
文件 34475 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\asn1t.h
文件 24435 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\asn1_mac.h
文件 38566 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\bio.h
文件 5351 2015-07-21 09:44 libcurl(with openssl libz libssh2)\include\openssl\blowfish.h
文件 41112 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\bn.h
文件 4907 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\buffer.h
文件 5601 2015-07-21 09:44 libcurl(with openssl libz libssh2)\include\openssl\camellia.h
文件 4659 2015-07-21 09:44 libcurl(with openssl libz libssh2)\include\openssl\cast.h
文件 3257 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\cmac.h
文件 28641 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\cms.h
文件 2335 2015-07-21 09:45 libcurl(with openssl libz libssh2)\include\openssl\comp.h
............此处省略94个文件信息
- 上一篇:力软敏捷开发框架操作手册2019.rar
- 下一篇:数据结构课程设计 华南理工大学
相关资源
- libcurl静态库[支持https]
- libcurl大文件
- libcurl-7.51静态库
- libcurl.lib32bit和64bit
- libcurl 以JSON模式post
- libcurl 7.51.0 封装库( V2.0.0.1 ),支持
- VS2015 NuGet 使用libcurl工程
- x64 windows libcurlopensslzlib编译好,VS直接
- libcurl支持https的dll和lib(包含openssl的
- win10 dll库libcurl 64位
- libcurl支持https访问curl支持openssl协议编
- libcurl相关资源
- libcurl.dll
- libcurl.lib 支持HTTPS的静态库
- VS2015下静态库libCurl
- libcurl 64位编译 lib 库
- libcurl.dll libcurl-4.dll
- LibcurlOpenSSLZlib.7z
- Libcurl---编译好的lib文件含releasedebug版
- libcurld.lib-libeay32.lib-ssleay32.lib-zlib.li
- VMware虚拟机报错,无法连接sigc-2.0.d
- libcurl7.52.1动态库
- windows平台curl 64位静态库和动态库
- libcurl 使用vs2010编译的动态库和静态库
- windows下libcurl64位动态库
- libcurl文件并显示进度
- libcurl.liblibcurl.dll 编译好的,包含64位
- 支持HTTPS的libcurl
评论
共有 条评论