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:

  1. 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

  2. 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)

  3. Next, go to Project|Project Properties|Linker|General|Additional Library Directories| Add the path to the lib directory. (Where curllib.dll is located)

  4. Then, go to Project|Project Properties|Linker|Input|Additional Dependencies| And add curllib.lib

  5. 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 WindowsOpenLDAP 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++引用的更多相关文章

  1. windows 下编译libcurl

    因为linux平台采用了libcurl,有一个程序移植到到windows平台,再linux采用libcurl.在windows下准备也采用该库.在网上搜索了几位同行写的,步骤上面有缺失. 本文将以详细 ...

  2. 开源免费的C/C++网络库(c/c++ sockets library)补充

    (1)ACE 庞大.复杂,适合大型项目.开源.免费,不依赖第三方库,支持跨平台. http://www.cs.wustl.edu/~schmidt/ACE.html (2)Asio Asio基于Boo ...

  3. libcurl 函数curl_easy_perform在release下崩溃的问题

    今天遇到一个很奇怪的问题: 工程中用到了libcurl, debug可以正常运行,release每次都崩溃,断到curl_easy_perform这一行.堆栈中也得不到有用信息,于是GOOGLE一番, ...

  4. 解决 WinXP下 libcurl.dll 无法定位程序输入点GetTickCount64问题

    1. 问题描述 用 IDA 打开libcurl.dll 可以在导入表看到对 GetTickCount64的引用,在 xp 的kernel32.dll中没有 GetTickCount64, 所以会出现  ...

  5. Yocto开发笔记之《嵌入式linux libcurl编程》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  6. libcurl安装使用方法-简单实用(摘录)

    http://curl.haxx.se/libcurl/c/example.html 官网c例子http://curl.haxx.se/download/curl-7.21.3.tar.gz 下载地址 ...

  7. [工作积累] android 中添加libssl和libcurl

    1. libssl https://github.com/guardianproject/openssl-android 然后执行ndk-build 2.libcurl 源代码组织结构, 下面的mak ...

  8. 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- ...

  9. libcurl返回常见错误码

    转载:https://blog.csdn.net/kenkao/article/details/46875571 转载:http://www.cnblogs.com/wainiwann/p/34929 ...

随机推荐

  1. [置顶] Hibernate运行机理

    Hibernate 的缓存体系 一级缓存: Session 有一个内置的缓存,其中存放了被当前工作单元加载的对象. 每个Session 都有自己独立的缓存,且只能被当前工作单元访问. 二级缓存: Se ...

  2. Vagrant 部署python开发环境

    Vagrant简介 Vagrant是一个基于Ruby的工具,用于创建和部署虚拟化开发环境.它使用Oracle的开源VirtualBox虚拟化系统,使用 Chef创建自动化虚拟环境. 在Windows下 ...

  3. OleDb 读取 excel

    //定义变量 _Application ExcelApp; Workbooks wbsMyBooks; _Workbook wbMyBook; Worksheets wssMysheets; _Wor ...

  4. rsync+inotify实现服务器之间文件实时同步--转

    之前做了“ssh信任与scp自动传输脚本”的技术文档,此方案是作为公司里备份的方法,但在实际的运行中,由于主服务器在给备份服务器传输的时候,我们的主服务器需要备份的文件是实时.不停的产生的,造成不知道 ...

  5. session过期后自动跳转到登陆页

    项目需要做一个自动登出的功能,查询了网上的资料,一开始准备用session监听做,按照下面方式配置监听器 1.在项目的web.xml文件中添加如下代码: <!--添加Session监听器--&g ...

  6. ajax的来龙去脉

    这是我在博客园写的第一遍博客,之前都是只看不写,在园子里学到了不少的东西,现在也想着把自己的一些感悟写出来给大家分享一下. ajax技术可以说是Web2.0应用程序的技术基础,尽管软件经销商和开源社区 ...

  7. linux批量执行工具omnitty使用方法

    一.omnitty概述 在生产环境中,可能会有多台linux主机.运维人员可能会对多台主机进行同样的操作,例:同时在多台主机上添加一个user或查看所有主机的硬件信息,如果没有批量操作工具,设备少于2 ...

  8. webform repeater

    repeater:由模板构成,解析后模板就不存在了             需要指定数据源进行数据绑定 List<Fruit> list = new FruitDA().Select(); ...

  9. 2015-09-28Javascript(一)

  10. eclipse - copy类的全名

    由于多次操作,感觉eclipse应该提供这个功能,网上搜一下,发现需要安装插件. 下载地址为 http://www.jave.de/eclipse/copyfully/copyfully_1.2.0. ...