我在使用cocoapods导入第三方, 编译的时候遇到报错信息类似:
**ld: in /Users/.../openssl/lib/libssl-tvOS.a(s2_meth.o), building for iOS simulator, but linking in object file built for tvOS, for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)**
工程中的libssl-tvOS.a是由我参考网上的<<制作openssl库>>教程拖进来的, cocoapods引入三方后编译出现了上面的问题. 目测提示是”链接的对象文件是为tvOS,x86_64编译的!”, 直接把这个文件从工程中移除之后就不报错了.
同类报错信息, stackoverflow上有参考:
building for tvOS, but linking in object file built for iOS, for architecture arm64