zoukankan      html  css  js  c++  java
  • mac安装protobuf2.4.1时报错./include/gtest/internal/gtest-port.h:428:10: fatal error: 'tr1/tuple' file not found和google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template

    通过网上下载的protobuf2.4.1的压缩文件,然后进行安装,./configure和make时遇到了两个问题。
    正常的安装步骤如下:
    ./configure
    make 
    make check
    make install
    protoc —version
     
    问题一
    protobuf2.4.1通过下载的tar.gz文件安装时./configure报错:./include/gtest/internal/gtest-port.h:428:10: fatal error: 'tr1/tuple' file not found
     
    解决方法
    进入解压后的protobuf2.4.1目录,输入命令【./autogen.sh】生成configure文件
     
    然后输入以下命令进行安装
    ./configure
    make 
    make check
    make install
     
    问题二
    安装到make步骤时报错:google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template
     
    解决方法
    编辑目录下的文件./src/google/protobuf/message.cc,添加头文件#include <istream>,问题解决,继续下面的安装步骤即可
     
     
    备注
    从git上下载protobuf2.4.1非常慢,然后再微盘上找到了一个下载资源http://vdisk.weibo.com/s/tYlk6JrNUYTY
     
  • 相关阅读:
    MySQL的备份和恢复-mysqldump
    MySQL日志功能详解
    MySQL查询缓存
    MySQL的用户管理
    doc常用命令
    记录mysql语句
    centos常用命令
    centos 7.6
    centos6 常用命令
    centos6.8 安装软件
  • 原文地址:https://www.cnblogs.com/meitian/p/5791042.html
Copyright © 2011-2022 走看看