究竟是什么crt1.3.1.o

dub*_*eat 3 clang ios xcode4.5

我正在使用xcode 4.5 My Base SDK是6.0,我的部署目标是5.1.当我尝试构建发布或分析时,我得到了一个错误的小宝石.

ld: file is universal (4 slices) but does not contain a(n) armv7s slice: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/crt1.3.1.o for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

现在....

我已经看到这个消息发布在stackoverflow上,但我仍然没有更聪明.

这个crt1.2.1.o究竟是什么引起了所有的大惊小怪?我能以某种方式修改它以消除我的错误吗?最后有人建议我只为活动架构设置构建.这样做有什么意义?

谢谢

Sve*_*ven 7

crt1.3.1.o文件包含C运行时库的启动代码.这初始化运行时,调用全局初始化器并最终调用该main函数.

您的项目设置必须有问题.您正在编译armv7s,但是这些库是从iOS 5.1 SDK链接的,它还不支持armv7s架构.