Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

x11/xlib with microsoft visual c++

I copy-past this code from Wikipedia: http://en.wikipedia.org/wiki/Xlib

And I'm getting this error:

fatal error C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory

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?

like image 868
Alice Avatar asked Oct 27 '25 09:10

Alice


1 Answers

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 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.

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, ...)

like image 189
SleuthEye Avatar answered Oct 28 '25 22:10

SleuthEye



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!