Cygwin:Libcurl 不工作

发布于 2024-11-18 15:32:24 字数 286 浏览 3 评论 0原文

我似乎无法让 libcurl 工作。我已经使用 cygwin 软件包安装程序安装了它,但是当我在 cygwin bash shell 中运行它时:

gcc -Wall -lcurl -g blah.c -o blah

我得到:

curl/curl.h: 没有这样的文件或目录`,

然后由 #include 引发的错误不起作用。

I can't seem to get libcurl to work. I've installed it with the cygwin package installer but when I run it in the cygwin bash shell with:

gcc -Wall -lcurl -g blah.c -o blah

It I get:

curl/curl.h: No such file or directory`,

then following errors that provoked by the #include <curl/curl.h> not working.

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

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

发布评论

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

评论(1

客…行舟 2024-11-25 15:32:24
find / -name curl.h

如果找到curl.h,则使用以下内容进行编译:

-I/directory/that/contains_the_curl_header

但不包含“curl.h”,仅包含包含它的目录。如果您这样做:

#include <curl/curl.h>

则仅使用包含curl目录的目录作为-I参数。

man gcc 了解更多信息。

find / -name curl.h

if curl.h is found, compile with this:

-I/directory/that/contains_the_curl_header

but do not include 'curl.h', just the directory containing it. If you are doing it like this:

#include <curl/curl.h>

then only use the directory that contains the curl directory as the -I parameter.

man gcc for more info.

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