Mac OSX Lion/X11/CImg库 [英] Mac OSX Lion/X11/CImg Library
问题描述
因此,我正在尝试将CImg图像编写库合并到我的 XCode项目中.库的文件包含以下包含,并且XCode给出此错误警告:
#include <X11/Xlib.h> Error: File not found
我的笔记本电脑正在运行OSX Lion 10.8.2,显然,苹果为Lion使用了X11,所以我继续此站点并下载了XQuartz,因为它是在 Apple支持页面上进行的操作 a>.
因此,安装后,我重新启动计算机并尝试运行XCode项目,但在该包含项上仍然出现相同的确切错误.
所以我不确定现在应该怎么做以解决此问题.如果在查找器中搜索"XLib.h",它会出现,并且我的查找器中也会出现一个名为X11的文件夹,所以我觉得我可能有需要的东西,但找不到.
头文件Xlib.h
在/opt/X11/include
中,因此将该路径添加到Xcode中的头搜索路径中:>
您可能还需要从/opt/X11/lib
添加库...
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...
这篇关于Mac OSX Lion/X11/CImg库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!