解决Xcode编译错误 ld: library not found for -lcrt1.3.1.o

  • Post author:
  • Post category:其他



从其他地方下载一个开源的项目,在arm64下是没问题的,但是在armv7下,出现“-lcrt1.3.1.o”找不到的错误


ld: library not found for -lcrt1.3.1.o

clang.ori: error: linker command failed with exit code 1 (use -v to see invocation)



解决办法


修改支持的最低iOS系统版本


在General -> Deployment Info -> Deployment Target中,把5.0(及以下的)改为6.0(及以上的)





修改后:







原因



下面是摘抄的英文原文,就没有翻译,意思是在iOS6以及更高的版本中,


crt1.3.1.o


已经没有了。




crt1.3.1.o

is a library that was included in older iOSes (and thus, their SDKs) but is no longer present in newer SDKs.  However, when the project’s Deployment Target is set to an older iOS (<6.0, as @Sandy has found), Xcode still tries linking against it.



版权声明:本文为skylin19840101原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。