mac编译安装protobuf

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sunxiaoju/article/details/85218619

1、在安装protobuf之前需要先安装git、make、automake等工具,安装方法请参考:https://blog.csdn.net/sunxiaoju/article/details/85217424

2、在安装好protobuf后需要安装protobuf,依赖库,首先使用:git clone https://github.com/protocolbuffers/protobuf克隆,如下图所示:

3、然后进入到protobuf目录执行./autogen.sh,此时会出现

configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL

If this token and others are legitimate, please use m4_pattern_allow.错误,如下图所示:

4、需要安装libtool,使用brew install libtool安装,如下图所示:

5、再次执行./autogen.sh即可,如下图所示:

6、然后执行:./configure,如下图所示:

7、然后执行make命令,如下图所示:

8、然后执行make install进行安装,如下图所示:

猜你喜欢

转载自blog.csdn.net/sunxiaoju/article/details/85218619
今日推荐