2011-11-02 65 views
2

我已将我的xcode升级到4.2(使用雪豹)。以前我使用的是Xcode 3.2.6,并且我的项目构建成功。现在我无法建立它,而不是Xcode中发出以下错误无法在xcode 4.2上构建我的项目

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搜索,但没有运气呢。 请提出了一些解决方案。

回答

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项目在Xcode 3.2.6然后

  1. 检查项目的构建设置,以确保你没有“-A” 指定Linking section of Build Settings
  2. 点击“验证设置”按钮enter image description here来识别可能导致问题的任何其他项目设置。

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

0

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