Xcode:gcc-4.2 失败,退出代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2060962/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode: gcc-4.2 failed with exit code 1
提问by genesys
I'm working on a game for the iPhone where I use the Oolong enginefor rendering, and now I just tried to update my project to the newest version.
我正在为 iPhone 开发一款游戏,我使用乌龙引擎进行渲染,现在我只是尝试将我的项目更新到最新版本。
However, now I get the following error when I try to compile:
但是,现在尝试编译时出现以下错误:
gcc-4.2 failed with exit code 1
In the build results I see in which cpp file the error happens, but I don't see any additional information.
在构建结果中,我看到错误发生在哪个 cpp 文件中,但我没有看到任何其他信息。
How can I get more info about what is going wrong in order to track down the problem?
我怎样才能获得更多关于问题所在的信息以追踪问题?
EDIT
编辑
After inspecting the compile output, i got the following lines, where the error occurs:
检查编译输出后,我得到以下几行,其中发生错误:
{standard input}:61:selected processor does not support 'fmrx r0, fpscr'
{standard input}:62:unshifted register required -- 'bic r0,r0,#0x00370000'
...somemorelines
{standard input}:69:selected processor does not support 'fmxr fpscr,r0'
This is some VFO code from one of the #include
files. It works fine in the examples that come with the engine. Could there be something screwed up with my project settings? I compared them to the one of the examples and they seem to be identical.
这是其中一个#include
文件中的一些 VFO 代码。它在引擎附带的示例中运行良好。我的项目设置有什么问题吗?我将它们与示例之一进行了比较,它们似乎是相同的。
采纳答案by Nimrod
Go to Build->Build Results or hit shift-command-B. There's an icon on the far right of the error message that looks like a bunch of horizontal lines. Click that or select "all messages".
转到 Build->Build Results 或点击 shift-command-B。错误消息的最右侧有一个图标,看起来像一堆水平线。单击它或选择“所有消息”。
You may also want to edit your preferences in Xcode to always show the Build Results while the build is going on, and only hide the window if there are no errors or warnings. that's what I do.
您可能还想在 Xcode 中编辑您的首选项,以便在构建进行时始终显示构建结果,并且仅在没有错误或警告时才隐藏窗口。我就是做这个的。
回答by Amine Rehioui
I had this error before, and the problem was that some files were deleted from disk and still referenced from the XCode project. Once I deleted those references, it worked.
我之前遇到过这个错误,问题是一些文件从磁盘中删除了,但仍然从 XCode 项目中引用。一旦我删除了这些引用,它就起作用了。
This is a big limitation of XCode, it should really have shown a basic 'could not open file' message instead of this cryptic error message.
这是 XCode 的一个很大限制,它真的应该显示一个基本的“无法打开文件”消息而不是这个神秘的错误消息。
回答by dave adelson
i had the same problem. in my case, the problem was that the same file was referenced twice in the Project Navigator (in different folders), leading to its being listed twice in Build Phases -> Compile Sources ...i think this happened when i re-generated managed subclasses of a core data model.
我有同样的问题。就我而言,问题是在 Project Navigator 中(在不同文件夹中)两次引用了同一个文件,导致它在 Build Phases -> Compile Sources 中被列出两次......我认为这发生在我重新生成托管核心数据模型的子类。
deleting the redundant reference in the Project Navigator (notthe files, just the duplicate reference!) solved the problem.
删除项目导航器中的冗余引用(不是文件,只是重复引用!)解决了这个问题。
回答by Joao Henrique
I had the same problem and know what I did.
我有同样的问题,知道我做了什么。
I started a new project and imported all the files from the old project.
我开始了一个新项目并从旧项目中导入了所有文件。
Viola!
中提琴!
回答by Evan Moran
In xcode, on the build results page, right click the error line and choose "Open These Latest Results as Transcript Text File". This will open the realxcode output log, which should contain a better description of the error then was previously seen.
在 xcode 中,在构建结果页面上,右键单击错误行并选择“将这些最新结果作为脚本文本文件打开”。这将打开真正的xcode 输出日志,其中应该包含比之前看到的更好的错误描述。
Note: This shows more information then the Build Results page alone.
注意:这会显示更多信息,然后是单独的“构建结果”页面。