简体   繁体   English

GCC-4.2退出代码1-Xcode失败

[英]GCC-4.2 Failed with Exit Code 1 - Xcode

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Hey all, 大家好,

I've been working on a big update to my app that's involved a lot of coding (talking hundreds or thousands of lines here) 我一直在进行应用程序的重大更新,涉及大量编码(在这里谈论数百行或数千行)

It's all been going really smoothly up until the latest code inset, I've added some code, that is in essence, the same as what's already in there with minor differences (a simple integer change from 77 to 78) and since then every time I try to build the code I get the above error message - now obviously it's not particulary helpful, any chance anyone can offer some good advice on this? 直到最近的代码插入为止,一切都一直非常顺利,我添加了一些代码,从本质上讲,它与已有的代码相同,只是存在细微的差异(从77到78的简单整数更改),从那时起每次我尝试构建得到上述错误消息的代码-现在显然这并不是特别有用,有人可以为此提供一些好的建议吗?

Edit as requested. 根据要求编辑。

    {standard input}:1580:branch out of range
{standard input}:1566:branch out of range
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Now there's several more of the standard input's but I figured there was no need to paste all of them. 现在有更多的标准输入,但是我认为没有必要全部粘贴。

That seems GCC speak for I can't jump 32k instructions away on this ARM chip, which could be solved by tweaking compilation options or not (if you made some optimization, undo it and check if that works), I'm afraid I'm no expert on that. 看来GCC表示我无法在此ARM芯片上跳32k指令,这可以通过调整编译选项与否来解决(如果您做了一些优化,请撤消它并检查是否可行),我恐怕我没有这方面的专家。 Or maybe you added code from other project which is non ARM friendly. 或者,也许您从非ARM友好的其他项目中添加了代码。

Search for "Compile for Thumb" option in the project build settings of the project and uncheck it. 在项目的项目构建设置中搜索“编译为Thumb”选项,然后取消选中它。 Doing a clean build after that will fix your problem. 之后执行干净的构建将解决您的问题。

I recently had the same problem when I upgraded to Lion & xcode 4 on a new mac. 我最近在新Mac上升级到Lion&xcode 4时遇到了同样的问题。 I transferred my project over and the build failed with the error reported here. 我转移了我的项目,并且构建失败并显示了此处报告的错误。 In my case, when I looked in the Build Phases/Compile Sources page, 3 of my files were shown in red indicating they hadn't been imported correctly. 就我而言,当我在“构建阶段/编译源”页面中查看时,我的文件中有3个显示为红色,表明它们未正确导入。 I removed the references and re-added the files to the project and it compiled fine. 我删除了引用,并将文件重新添加到项目中,并且编译良好。

I solved the problem in my projects by using LLVM-GCC-4.2 compiler (still XCode 3.25, don't know about the situation in XCode 4). 我使用LLVM-GCC-4.2编译器解决了项目中的问题(仍然是XCode 3.25,不了解XCode 4中的情况)。 Especially the library project that uses Obj-C, Obj-C++ and a heavily optimised C++ math template library called Eigen was otherwise not compileable. 尤其是使用Obj-C,Obj-C ++和经过高度优化的C ++数学模板库(称为Eigen)的库项目无法编译。

To use LLVM-GCC go to the project info dialog (menu Project/Edit Project Settings) and click on the build tab. 要使用LLVM-GCC,请转到项目信息对话框(菜单项目/编辑项目设置),然后单击生成选项卡。 Look for C/C++ compiler Version and select LLVM GCC 4.2. 查找C / C ++编译器版本,然后选择LLVM GCC 4.2。 Take care that the change is done in both configurations release and debug - you toggle between them (or edit both at once) in the configuration select box at the top. 请注意,更改是在配置发布和调试中都完成的-您可以在顶部的配置选择框中在它们之间切换(或一次编辑)。

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

相关问题 Xcode:gcc-4.2失败,退出代码为1 - Xcode: gcc-4.2 failed with exit code 1 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