So I'm trying to incorporate the CImg image writing library into my XCode project However, the header file for the library contains the following include and XCode gives this error warning:
#include <X11/Xlib.h> Error: File not found
My laptop is running OSX Lion 10.8.2 and apparently, apple took away X11 for Lion, so I went on this site and downloaded XQuartz because that's what it said to do on the Apple Support page.
So after the installation, I restarted my computer and tried to run my XCode project, but I'm still getting the same exact error on that include.
So I'm not sure what I should do now to fix this. If I search in finder for "XLib.h", it appears and I have a folder called X11 which appears in my finder as well, so I feel like I probably have what I need but I can't figure it out.
The header file Xlib.h
is in /opt/X11/include
, so add that path to the Header Search Paths in Xcode:
You'll probably need to add libraries from /opt/X11/lib
as well...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With