在 Eclipse 中找不到 Xlib.h 和 Xutil.h,我该如何解决这个问题?
我是用于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用 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.