一、修改platform_macros.h
platform_macros.h的目录位置为/Users/xxxx/protobuf-2.5.0/src/google/protobuf/stubs
在platform_macros.h中增加如下代码
#elif defined(__arm64__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
效果图

二、编译protobuf
进入protobuf-2.5.0目录,执行如下命令
./configure --prefix=/Users/local/install/protobuf2.5.0
make
make install
三、配置环境变量
vi ~/.bash_profile

2万+

被折叠的 条评论
为什么被折叠?



