简体   繁体   English

无法在xcode 4.2上构建我的项目

[英]Not able to build my project on xcode 4.2

I have upgraded my xcode to 4.2 (using snow leopard).Previously i was using Xcode 3.2.6 and my project build successfully with it. 我已经将xcode升级到4.2(使用雪豹)。以前我使用的是Xcode 3.2.6,我的项目使用它成功构建。 Now I'm unable to build it, instead Xcode emits the following error 现在我无法构建它,而是Xcode发出以下错误

ld: warning: option -A is obsolete and being ignored
ld: entry point (start) undefined.  Usually in crt1.o for architecture armv7
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

The error seems to be some compiler error but can't figure it out .:( I googled for it but no luck yet. Please suggest some solution. 该错误似乎是一些编译器错误,但无法弄清楚。:((我用Google搜索它,但还没有运气。请提出一些解决方案。

检查您是否正在使用以下标志,它将导致该错误-nostdlib-noconfig

我可以通过更新项目目标>构建设置中的“ iOS开发目标”来解决此问题

It looks like linker is looking for a start function as entry point in crt1, but didn't find it. 看起来链接器正在crt1中寻找一个启动函数作为入口点,但没有找到它。 You can try adding a linker flag, 您可以尝试添加链接器标志,

  -e symbol_name Specifies the entry point of a main executable. By default the entry name is "start" which is found in crt1.o which contains the glue code need to set up and call main(). 

from the man page of ld. 来自ld的手册页。

The first error means the linker (ld) in Xcode 4.2 encountered an option (-A) that is no longer supported. 第一个错误意味着Xcode 4.2中的链接器(ld)遇到了不再受支持的选项(-A)。

If you no longer need to build the same Xcode project in Xcode 3.2.6 then 如果您不再需要在Xcode 3.2.6中构建相同的Xcode项目,则

  1. check your Project's Build Settings to ensure you don't have '-A' specified 检查项目的构建设置,以确保未指定“ -A” 构建设置的链接部分 .
  2. click on the "Validate Settings" button 点击“验证设置”按钮 在此处输入图片说明 to identify any other project settings that may cause problem. 以确定可能导致问题的任何其他项目设置。

Your second error may be caused by Xcode 4.2 defaulting to armv7 build architecture that is unlisted your Xcode project (because it was built using Xcode 3.2.6). 您的第二个错误可能是由于Xcode 4.2默认为未列出Xcode项目的armv7构建体系结构(因为它是使用Xcode 3.2.6构建的)。 If you need to build binaries for armv6, then add that to your build architecture list. 如果您需要为armv6构建二进制文件,则将其添加到构建体系结构列表中。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM