libCurl的C++引用
I believe I have gotten LibCurl to work with Visual Studio 2013 now. Persistence ftw! Although, after spending hours trying to solve these error messages, I am a little hesitant at saying everything is working fine now. That is why I am putting a bounty on this question to get clear and conciseinstructions on getting LibCurl to work with Visual Studio 2013.
This is what I did to get it to work:
First, download the Win32 MSVC package here: http://curl.haxx.se/download.html#Win32 For these instructions sake, let's say you downloaded to C:\LibCurl
Start a new project in Visual Studio. Go to Project|Project Properties|VC++ Directories|Include Directories| Add the path to the include directory inside the downloaded package. (C:\LibCurl\include)
Next, go to Project|Project Properties|Linker|General|Additional Library Directories| Add the path to the lib directory. (Where curllib.dll is located)
Then, go to Project|Project Properties|Linker|Input|Additional Dependencies| And add curllib.lib
Now if you compile a test program, you will likely get the message saying libsasl.dll is missing. You will need to download this file and put it in the same directory as your build. I used 7-Zip to extract libsasl.dll from OpenLDAP for Windows. OpenLDAP for Windows
This is the result of my test code from above:
------------配置好后,将dl放置到对应的目录下--------------------
示范代码
#include <iostream>
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.baidu.com");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
libCurl的C++引用的更多相关文章
- windows 下编译libcurl
因为linux平台采用了libcurl,有一个程序移植到到windows平台,再linux采用libcurl.在windows下准备也采用该库.在网上搜索了几位同行写的,步骤上面有缺失. 本文将以详细 ...
- 开源免费的C/C++网络库(c/c++ sockets library)补充
(1)ACE 庞大.复杂,适合大型项目.开源.免费,不依赖第三方库,支持跨平台. http://www.cs.wustl.edu/~schmidt/ACE.html (2)Asio Asio基于Boo ...
- libcurl 函数curl_easy_perform在release下崩溃的问题
今天遇到一个很奇怪的问题: 工程中用到了libcurl, debug可以正常运行,release每次都崩溃,断到curl_easy_perform这一行.堆栈中也得不到有用信息,于是GOOGLE一番, ...
- 解决 WinXP下 libcurl.dll 无法定位程序输入点GetTickCount64问题
1. 问题描述 用 IDA 打开libcurl.dll 可以在导入表看到对 GetTickCount64的引用,在 xp 的kernel32.dll中没有 GetTickCount64, 所以会出现 ...
- Yocto开发笔记之《嵌入式linux libcurl编程》(QQ交流群:519230208)
开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...
- libcurl安装使用方法-简单实用(摘录)
http://curl.haxx.se/libcurl/c/example.html 官网c例子http://curl.haxx.se/download/curl-7.21.3.tar.gz 下载地址 ...
- [工作积累] android 中添加libssl和libcurl
1. libssl https://github.com/guardianproject/openssl-android 然后执行ndk-build 2.libcurl 源代码组织结构, 下面的mak ...
- Libcurl安装及编译
1.安装curl wget http://curl.haxx.se/download/curl-7.26.0.tar.gz tar -zxvf curl-7.26.0.tar.gz cd curl- ...
- libcurl返回常见错误码
转载:https://blog.csdn.net/kenkao/article/details/46875571 转载:http://www.cnblogs.com/wainiwann/p/34929 ...
随机推荐
- 关于this的使用
一.关于this的使用 javaScript的this总是指向一个对象,而具体指向哪个对象是在运行时基于函数的执行环境动态绑定的,而非函数被声明时的环境 二.具体到实际应用中,this指向大致可以分为 ...
- 一个高级PHP工程师所应该具备的
初次接触PHP,就为他的美所折服,于是一发不可收拾. 很多面试,很多人员能力要求都有“PHP高级工程师的字眼”,如果您真心喜欢PHP,并且您刚起步,那么我简单说说一个PHP高级工程师所应该具备的,希望 ...
- apply 与arguments的用法
一个小练习: 用一个 函数来代替console.log()的功能 function log(a){ console.log.apply(null,arguments);//arguments 是传的实 ...
- 写自己的WPF样式 - 按钮
做一个后台管理小程序,据说WPF的界面比较"炫",于是选择使用WPF来开发.既然用了WPF当然需要做好看点了,于是稍微研究了下WPF的样式,废话不多说下面开始自定义一个按钮样式: ...
- freemarker的使用心得
freemarker眼下尽管使用的公司不多,可是在某些时候就必须使用,当须要遍历json数据的时候,眼下市面上的好多显示组件都达不到要求唯一能用的也就仅仅有freemarker了.在java里使用的模 ...
- [OpenNebula]中间件訪问驱动程序
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2 ...
- ERROR<53761> - Plugins - conn=-1 op=-1 msgId=-1 - Connection Bind through PTA failed (91). Retrying...
LDAP6.3在DSCC控制台启动实例完成,但是操作状态显示“意外错误”,查看日志如下: 04/May/2016:21:10:39 +0800] - Sun-Java(tm)-System-Direc ...
- OD: DEP & Ret2Libc
Data Execution Prevention,数据执行保护,专门用来弥补计算机对数据和代码混淆这一天然缺陷. DEP 的原理是将数据所在的内存页(默认的堆.各种堆栈页.内存池页)标记为不可执行, ...
- div中实现居中
今天纠结了大半天的居中,把学到的先记录下来,还没完全弄清楚,发现网上原创的技术贴并不算多,大多都是相互转载.(ps.先安利一个大神的帖集,昨天才发现的,内容丰富,语言,呃...很幽默,一般都是图文并茂 ...
- Myeclipse+Tomcat安装与配置
一: Myeclipse安装很简单,没什么可说的,下面说一下怎么把英文版的Myeclipse汉化的问题 1.把汉化包解压,将解压后的“language”文件夹,放入Myeclipse\common文件 ...