Xcode protobuf2.5添加arm64编译器补丁生成静态库

项目需求,protobuf源码编成静态库使用

但是,github上的protobuf源码没有对应arm64的编译器定义,编译出来的静态库使用时报错。

下面的连接是arm64编译器代码补丁包,把编译器代码放到src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h

然后src/google/protobuf/stubs/atomicops.h的宏定义部分加上

protobuf Arm64编译器文件https://github.com/protocolbuffers/protobuf/commit/2ca19bd8066821a56f193e7fca47139b25c617ad配置完后在Xcode中再次编译静态库文件,使用无报错。

猜你喜欢

转载自blog.csdn.net/liuyongjie1992/article/details/132099438