简体   繁体   English

如何将curlpp添加到我的项目中?

[英]How do I add curlpp to my project?

I'm trying to make a transition from vb.net to C++ and I'm stuck on this. 我正试图从vb.net转换到C ++,我坚持这个。 I downloaded curlpp from here which got me a .dll, .exp and .lib file. 我从这里下载了curlpp,它给了我一个.dll,.exp和.lib文件。 I added the directory that contains those 3 files to "Additional Library Directories" in the project properties (Linker -> General). 我将包含这3个文件的目录添加到项目属性中的“附加库目录”(链接器 - >常规)。

Next, I added ws2_32.lib and Wldap32.lib to "Additional Dependencies", also in the project properties (Linker -> Input) because this question stated I should. 接下来,我在项目属性(链接器 - >输入)中添加了ws2_32.lib和Wldap32.lib到“附加依赖项”,因为这个问题说明了我应该。

Now I'm trying to get Example 00 to work, but 现在我试图让示例00工作,但是

#include <curlpp/curlpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>

States "cannot open source file curlpp/curlpp.hpp" etc. which makes sense because I have never even seen those files. 国家“无法打开源文件curlpp / curlpp.hpp”等有意义,因为我从未见过这些文件。 What am I doing wrong? 我究竟做错了什么? This is quite different from vb.net and I can't seem to figure it out. 这与vb.net完全不同,我似乎无法弄明白。

UPDATE: 更新:

I did what Mat said, but it didn't work, so I added all relevent folders to be sure. 我做了Mat所说的,但它没有用,所以我添加了所有相关文件夹以确定。 包括

But VS still states the files can't be found. 但VS仍然说无法找到文件。

You should download the full source package ( .tar.gz in the downloads section) to get the headers, code, samples and documentation. 您应该下载完整的源代码包( 下载部分中的.tar.gz )以获取标题,代码,示例和文档。

You'll need to add the base directory where the include files reside on your machine (after unpacking the archive) to the list of include directories for your project. 您需要将包含文件驻留在计算机上的基本目录(解压缩归档后)添加到项目的包含目录列表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM