在 Eclipse 中找不到 Xlib.h 和 Xutil.h,我该如何解决这个问题?

发布于 2024-09-01 18:16:08 字数 464 浏览 1 评论 0原文

我是用于 C/C++ 开发的 Eclipse IDE 的新手。我刚刚安装了 MingW 并将其设置为系统的环境变量。我正在尝试制作一个使用 X 库的应用程序,但 eclipse 似乎找不到它。 Eclipse 可以与任何其他简单的标准库函数一起使用,但它无法找到 X 库。请帮忙!

下面是一个失败的示例代码片段:

#include <stdio.h>
#include <X11/Xlib.h> // Can't find this
#include <X11/Xutil.h> // Or this...

int main()
{
    printf("Hello");
    return 0;
}

我必须从某处下载 X 库吗?如果是这样那么我应该从哪里粘贴它到哪里?请告诉我该怎么做才能开始在 Eclipse 中使用 Xlib 进行编码。如果您发现任何有用的链接,请随时发布。谢谢。

I'm a newbie to Eclipse IDE for C/C++ development. I just installed MingW and set it up as my system's environment variable. I am trying to make an application that uses the X library but eclipse cant seem to find it. Eclipse works with any other simple standard library functions but it cant find the X library. Please Help!

Here's a sample code snippet that's failing:

#include <stdio.h>
#include <X11/Xlib.h> // Can't find this
#include <X11/Xutil.h> // Or this...

int main()
{
    printf("Hello");
    return 0;
}

Do I have to download the X library from somewhere? If so then from where and where do I paste it to? Please tell me what to do in order for me to start coding using the Xlib in Eclipse. If you find any useful links, please dont hesitate to post. Thanks.

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

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

发布评论

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

评论(1

满栀 2024-09-08 18:16:09

您需要使用 MinGW 下载并构建 X.org 库,才能成功构建任何X 客户端。在任何下载镜像上的 current/src/lib/ 下查看。

You'll need to download and build the X.org libraries with MinGW in order to successfully build any X client. Look under current/src/lib/ on any download mirror.

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