问题描述
我复制 - 从维基百科中删除此代码:
I copy-past this code from Wikipedia:http://en.wikipedia.org/wiki/Xlib
我收到此错误:
fatal error C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory
我认为它适用于c ++,即使代码是c,或者至少找到库x11?
I assume it works for c++ even the though the code is c, or at least find the library x11?
...任何人都知道我在这里做错了什么?
Been stuck on this problem entire day... anyone have any idea what I'm doing wrong here?
推荐答案
C ++,你在一个Windows平台上。
现在,从引用来自:
I'm assuming from your usage of Microsoft visual C++ that you are on a windows platform.Now, from http://en.wikipedia.org/wiki/X_Window_System referenced from http://en.wikipedia.org/wiki/Xlib:
这就是为什么编译器找不到X11 / XLib.h头。您需要安装其中一个实现,或者使用抽象层,例如(GTK +,Qt,SDL,...)
This is why the compiler can't find the "X11/XLib.h" header. You would need to either install one of those implementations or otherwise use an abstraction layer such as one of those mentioned in http://en.wikipedia.org/wiki/Xlib (GTK+, Qt, SDL, ...)
这篇关于x11 / xlib与微软视觉c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!