gpt4 book ai didi

c++ - 无法打开包含文件 : 'cpprest/http_client.h'

转载 作者:太空狗 更新时间:2023-10-29 19:52:12 34 4
gpt4 key购买 nike

我正在尝试使用 casablanca 'c++ rest sdk' 为 REST 请求运行 c++ Windows 应用程序。我创建了新的“CLR 空项目”(visual studio 2012)并添加了新项目 - “Windows 窗体”。添加了一些代码并在运行项目时能够看到一个表单。现在,我已经按照说明使用 NuGet 安装了 c++ rest sdk。一切顺利。问题是为了使用“c++ rest sdk”,我添加了这些:

#include <cpprest/http_client.h>
#include <cpprest/filestream.h>

它没有找到那些文件。我得到了

fatal error C1083: Cannot open include file: 'cpprest/http_client.h': No   such file or directory

项目截图: project screenshot

谢谢!

最佳答案

你必须包含这个路径:

C:\YourProject\packages\cpprestsdk.v140.windesktop.msvcSTL.dyn.rt-dyn.2.8.0\build\native\include

和:

C:\YourProject\packages\cpprestsdk.v140.windesktop.msvcSTL.dyn.rt-dyn.2.8.0\lib

我在添加 NuGet 包后遇到了同样的问题。 include 和 lib 文件夹不会像描述中所说的那样自动链接。

关于c++ - 无法打开包含文件 : 'cpprest/http_client.h' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29658672/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com