捆绑包无法从XCode找到复制的框架 [英] Bundle can't find copied framework from XCode

查看:66
本文介绍了捆绑包无法从XCode找到复制的框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XCode项目,可以将SDL.framework复制到我的应用程序捆绑包中,直到最近,它都可以正常工作.我可以将捆绑包交给没有SDL.framework的人,这样可以正常工作.但是昨天我的一个朋友说我的应用程序崩溃是因为找不到SDL.framework.我从我的/Library/Frameworks文件夹中删除了SDL.framework,以便在我的机器上对其进行测试,他是对的.即使我的捆绑包中存在SDL.framework,该应用仍会崩溃,因为找不到它.

I have an XCode project which copies SDL.framework to my app bundle and, up until recently, this worked fine. I could give my bundle to someone who didn't have SDL.framework and it would work. But yesterday a friend of mine said my app was crashing because it couldn't find SDL.framework. I removed SDL.framework from my /Library/Frameworks folder to test it on my machine and he's right. Even though SDL.framework exists in my bundle the app still crashes because it can't find it.

为什么会这样?我唯一能想到的是,我上一次进行有效构建时是在MacOS 10.6上并使用XCode3.我现在在10.7上.我已经用XCode 3和XCode 4测试了一个新版本,但是都产生了上面列出的问题.

Why would this be? The only thing I can think of is that the last time I did a working build was on MacOS 10.6 and using XCode 3. I'm now on 10.7. I've tested a new build with XCode 3 and XCode 4 but both produce the problem listed above.

推荐答案

前几天,我在构建用于发送电子邮件的工具时遇到了这种情况.我当时链接的是哑剧"框架.这是我必须设置的设置,才能使其开始工作并停止找不到库"的崩溃.您可以看到我在哪里拥有与项目文件/工作空间文件相关的框架.

I had this happen to me the other day when I was building a tool for sending Email. I was linking against the Pantomime framekwork. Here are the settings that I had to set in order for it to start working and stop crashing with "could not find library" You can see where I have the framework in relation to the project files / workspace files.

这篇关于捆绑包无法从XCode找到复制的框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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