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

问题描述 投票:2回答:4

我已将我的xcode升级到4.2(使用雪豹)。之前我正在使用Xcode 3.2.6并且我的项目使用它成功构建。现在我无法构建它,而是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

错误似乎是一些编译器错误,但无法搞清楚。:(我google了它但没有运气。请建议一些解决方案。

ios xcode xcode4.2
4个回答
0
投票

看起来链接器正在寻找一个启动函数作为crt1中的入口点,但没有找到它。您可以尝试添加链接器标志,

 -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().

来自ld的手册页。


0
投票

第一个错误意味着Xcode 4.2中的链接器(ld)遇到了不再支持的选项(-A)。

如果您不再需要在Xcode 3.2.6中构建相同的Xcode项目

  1. 检查项目的构建设置,确保没有指定“-A”。
  2. 单击“验证设置”按钮以识别可能导致问题的任何其他项目设置。

您的第二个错误可能是由Xcode 4.2默认为未安装Xcode项目的armv7构建体系结构引起的(因为它是使用Xcode 3.2.6构建的)。如果需要为armv6构建二进制文件,请将其添加到构建体系结构列表中。


0
投票

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


0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.