Windows 上的curl/curl.h

发布于 2024-10-09 03:22:04 字数 474 浏览 0 评论 0原文

我的 C++ 脚本中有以下内容:

#include "curl/curl.h"

当我尝试编译它时,出现以下错误:

\Users\用户名\Desktop\Temp\talkbot\main.cpp C:\Users\用户名\Desktop\Temp\talkbot\Ccurl.h:没有这样的文件或目录。

所以我到处搜索并尝试下载 Windows 版的 cURL。我最终访问了 http://www.paehl.com/open_source/?CURL_7.21.3 并选择不使用 SSL 进行下载。我下载了它,然后得到了curl.exe。

我应该如何处理该文件才能获取curl.h?提前致谢。

I have the following in my c++ script:

#include "curl/curl.h"

When I try to compile it, I get the following error:

\Users\username\Desktop\Temp\talkbot\main.cpp C:\Users\username\Desktop\Temp\talkbot\C curl.h: No such file or directory.

So I searched around and tried to download cURL for windows. I ended up on http://www.paehl.com/open_source/?CURL_7.21.3 and choose Download without SSL. I downloaded it and I simply got curl.exe.

What am I supposed to do with that file to get curl.h? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

诠释孤独 2024-10-16 03:22:04

您可以在 cURL 网站上的源存档中获取所需的文件:

http://curl.haxx.se/下载.html

You can get the required files in the source archive on the cURL website:

http://curl.haxx.se/download.html

赠我空喜 2024-10-16 03:22:04

我现在(2014 年)提出了这个答案,有些链接已经过时了。

对于所有一般信息(所有平台),您可以开始阅读 http://curl.haxx.se

有下载向导帮助选择当前最实际和相关的文件或二进制文件 http://curl.haxx.se /dlwiz/。为了回答这个问题,需要在向导中选择“libcurl”。目前,win64 似乎仅在 cygwin 版本中可用,因此请使用 win32,直到这种情况发生改变。

I bumped this answer now (2014) and some links are outdated.

For all general info (all platforms) you can start to read at http://curl.haxx.se

There is a download wizard helping to choose the most actual and relevant file or binary at the moment http://curl.haxx.se/dlwiz/. For answering this question "libcurl" is to be chosen in the wizard. At the moment win64 only seems to be available in cygwin version, so go for win32 until this might change.

无力看清 2024-10-16 03:22:04

发现此链接很有帮助

https://curl.haxx.se/download.html

选择Windows 的 zip 文件

选择 Linux 机器的 tar.gz 文件

Found this link to be helpful

https://curl.haxx.se/download.html

Choose zip files for Windows

Choose tar.gz files for linux machines

指尖上的星空 2024-10-16 03:22:04

2021 年 2 月 1 日,
我在构建 3d 切片器的源代码时遇到了同样的问题。我发现我的系统中有两个curl目录(一个是我安装在路径C:\Program Files (x86)中,另一个文件夹是我为该项目下载的源代码中)。主要是,CMake 采用第一个文件夹的路径而不是第二个文件夹的路径。

解决方案:我创建了环境变量“curl_dir”(包含curl头文件的文件夹)并重新构建它。
注意:创建的环境变量是源代码文件夹中的cmakelists.txt中的名称。

FEB 1 2021,
I had the same issue while building the source code of 3d slicer. I found that there are two directories of curl in my system (one installed by me in the path C:\Program Files (x86) and the other folder was in the source code I have downloaded for the project). primarily, the CMake takes the path of the first folder instead of the second folder.

solution: I created the environmental variable "curl_dir" (the folder containing header files of curl) and re-built it.
note: the created environment variable is the name in the cmakelists.txt in the source code folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文