我知道这里还有其他关于Linker和Xcode 4的问题,但它们与我的问题并没有真正的联系.
I know there are several other questions here regarding the Linker and Xcode 4, but they don't really relate to my problem.
我已经构建了Allegro 5.1,并且由于FreeType花了我一段时间,但最终成功了.现在,我使用Allegro编写了一个太空入侵者小游戏.但是以某种方式,链接器找不到该框架.
I've built Allegro 5.1 and it took me a while because of FreeType, but eventually it worked. Now I've written a little Space Invader game using Allegro. But somehow the linker can't find the framework.
到目前为止我所做的:
- 这些框架位于/Library/Frameworks/中,并且与该地方的所有其他框架具有相同的结构
- 我已将框架添加到目标的将二进制文件与库链接"标签中
- 我已将它们添加到目标为框架"的目标的复制文件"标签中
- 我在构建设置"中添加了正确的路径设置,以便可以找到头文件
我已经完成了所有正确的步骤,但仍然可以:
I've done all the right steps, but still I get:
ld: framework not found Allegro-5.1 clang: error: linker command failed with exit code 1 (use -v to see invocation)我已经有一个工作框架,但是它是作为共享库而非"framwork模式"安装的.但是将框架组件添加到项目中有点困难,因为它们存储在/usr/local/lib中,无法在文件对话框中选择...
I already had a working framework, but it was installed as shared libs and not in "framwork mode". But adding the framework components to the project was kinda hard because they were stored in /usr/local/lib, which can't be selected with the file dialog...
所以...我不知道该怎么办.当我拥有共享库时,它可以工作,但是现在具有相同的设置,但是位置不同,所以不再可用.告诉我是否需要更多信息,我会提供!
So... I have no idea what else there should be to do. When I had the shared libs it worked, but now with the same setting but different location it doesn't anymore. Tell me if you need more information, I'll provide it!
推荐答案因此,万一有人落在这里,借助Allegro IRC中的elias,我发现了错误":
So, in case someone lands here, with the help of elias in the Allegro IRC I've found the "error":
在目标Build Settings中,我必须将Framework Search Paths指定为/Library/Frameworks.
In my targets Build Settings I had to specify the Framework Search Paths as /Library/Frameworks.
这对我来说真的没有意义,因为这是Mac OS X上Frameworks的默认目录,但无论如何...
This doesn't really make sense to me, since this is the default directory for the Frameworks on Mac OS X, but whatever...
更多推荐
Xcode 4和Allegro 5.1
发布评论