:: CFBundleLoadExecutable无法加载编译的bundle(Mountain Lion,Xcode 4.6) [英] ::CFBundleLoadExecutable Can not load compiled bundle (Mountain Lion, Xcode 4.6)
问题描述
大家好!
我现在正在将项目从Xcode 3.2转换为Xcode 4.6。
我成功了编译项目,但现在我有以下问题:
函数 :: CFBundleLoadExecutable 在尝试加载编译的bundle之后返回FALSE。当我尝试使用函数 :: CFBundleLoadExecutableAndReturnError 时,我得到的错误是: CFBundleExecutableLoadError(-2002)
原因字符串是:捆绑包是损坏或缺少必要的资源
建议是:尝试重新安装捆绑包。
如您所见,这是一个非常有用的信息。也许有人可以建议一个更好的方法来了解捆绑的问题是什么?谢谢!
最奇怪的是 - 如果我通过XCode启动应用程序 - 一切正常。 (即使它是Release编译)。但是如果我从菜单/命令行运行应用程序 - CFBundleExecutableLoadError失败:(
谢谢!
Hello All!
I am now in the process of converting our projects from Xcode 3.2 to Xcode 4.6.
I succeeded in compiling the projects, but now I have the following problem:
Function ::CFBundleLoadExecutable returns me FALSE after trying to loading compiled bundle. When I tried to use function ::CFBundleLoadExecutableAndReturnError instead the error I got was: CFBundleExecutableLoadError (-2002)
The reason string is: The bundle is damage or missing necessary resources
The suggesting is: Try to reinstall the bundle.
As you can see, this is an extremely "helpful" information. Maybe someone can suggest a better way to understand what is the problem with the bundle? Thanks!
The strangest thing is - If I launch an application through XCode - everything works. (Even if it is Release compilation). But if I run application from Menu / Command Line - CFBundleExecutableLoadError fails :(
Thanks!
推荐答案
最终发现了一个问题。其中一个库中的bundle的DLL存在依赖关系,这个名称在后期构建阶段由install_name_tool更改。在Xcode 4.6中更改了install_name_tool位置,所以这步骤丢失了,因此bundle的dll在错误的位置寻找错误的库。
我猜错误就像缺少库XXXXX对Apple来说太多了。 ..
希望有一天能帮到某人。
Found a problem eventually. There was a dependency in the bundle's DLL on one of the libraries, which name was changed during the Post-Build stage by install_name_tool. install_name_tool location was changed in Xcode 4.6, so this step was missing, therefore bundle's dll looked for the wrong library in wrong location.
I guess giving error like "Library XXXXX in missing" is too much for Apple....
Hope it will help someone someday.
这篇关于:: CFBundleLoadExecutable无法加载编译的bundle(Mountain Lion,Xcode 4.6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!