简体   繁体   English

Xcode:gcc-4.2失败,退出代码为1

[英]Xcode: gcc-4.2 failed with exit code 1

I'm working on a game for the iPhone where I use the Oolong engine for rendering, and now I just tried to update my project to the newest version. 我正在为iPhone开发游戏,使用Oolong引擎进行渲染,现在我只是尝试将项目更新为最新版本。

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. 这是#include文件之一中的一些VFO代码。 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. 我将它们与示例之一进行了比较,它们似乎是相同的。

I had this error before, and the problem was that some files were deleted from disk and still referenced from the XCode project. 我之前有此错误,问题是某些文件已从磁盘上删除,但仍从XCode项目中引用。 Once I deleted those references, it worked. 一旦删除了这些引用,它就会起作用。

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的一个很大的限制,它实际上应该显示一条基本的“无法打开文件”消息,而不是此隐秘的错误消息。

Go to Build->Build Results or hit shift-command-B. 转到“生成”->“生成结果”或按shift-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". 单击该按钮或选择“所有消息”。

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. 您可能还需要在Xcode中编辑首选项,以在构建进行中始终显示构建结果,并且仅在没有错误或警告的情况下才隐藏窗口。 that's what I do. 我就是做这个的。

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. 就我而言,问题是在项目浏览器中(在不同文件夹中)两次引用同一文件,导致在“构建阶段”->“编译源代码”中两次列出该文件...我认为当我重新生成托管文件时会发生这种情况核心数据模型的子类。

deleting the redundant reference in the Project Navigator ( not the files, just the duplicate reference!) solved the problem. 在项目浏览器中删除冗余引用( 不是文件,只是重复的引用!)解决了该问题。

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! 中提琴!

In xcode, on the build results page, right click the error line and choose "Open These Latest Results as Transcript Text File". 在xcode中,在生成结果页面上,右键单击错误行,然后选择“打开这些最新结果作为脚本文本文件”。 This will open the real xcode output log, which should contain a better description of the error then was previously seen. 这将打开实际的 xcode输出日志,该日志应包含对该错误的更好描述,而先前所见的错误。

Note: This shows more information then the Build Results page alone. 注意:仅在“构建结果”页面上显示此信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GCC-4.2退出代码1-Xcode失败 - GCC-4.2 Failed with Exit Code 1 - Xcode gcc-4.2失败,在Xcode中退出代码为1 - gcc-4.2 failed with exit code 1 in Xcode gcc-4.2失败,退出代码为1 iPhone - gcc-4.2 failed with exit code 1 iphone gcc-4.2失败,退出代码为1错误 - gcc-4.2 failed with exit code 1 Error gcc-4.2失败,退出代码为1 iphone - gcc-4.2 failed with exit code 1 iphone Apple Push通知问题gcc-4.2失败,退出代码为1 - Apple Push notification Problem gcc-4.2 failed with exit code 1 GCC-4.2失败,错误代码为1 - GCC-4.2 Failed With Error Code 1 Box2D xcode 项目编译器错误“Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1” - Box2D xcode project compiler errors “Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1” 找不到库-命令/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2失败,退出代码为1 - library not found - Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 为什么我会收到此错误:“Command / Developer / Platforms / iPhoneSimulator.platform / Developer / usr / bin / gcc-4.2使用退出代码1失败”? - Why do i get this error: “Command/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM