x11 / xlib与微软视觉c ++ [英] x11/xlib with microsoft visual c++

查看:215
本文介绍了x11 / xlib与微软视觉c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我复制 - 从维基百科中删除此代码:
http://en.wikipedia.org / wiki / Xlib

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平台上。
现在,从 http://en.wikipedia.org/wiki/X_Window_System 引用来自 http://en.wikipedia.org/wiki/Xlib

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:


Microsoft Windows不是对X的支持,但是存在许多第三方实现,如免费和开源软件,如Cygwin / X和专有产品如Exceed,MKS X / Server,Reflection X,X-Win32和Xming。

Microsoft Windows is not shipped with support for X, but many third-party implementations exist, as free and open source software such as Cygwin/X, and proprietary products such as Exceed, MKS X/Server, Reflection X, X-Win32 and Xming.

这就是为什么编译器找不到X11 / XLib.h头。您需要安装其中一个实现,或者使用抽象层,例如 http: //en.wikipedia.org/wiki/Xlib (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 ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆