mac os安装protobuf 2.4错误解决方法
来源:互联网 发布:石家庄网站排名优化 编辑:程序博客网 时间:2024/04/25 06:06
在编译安装protobuf 2.4时(具体安装方法可以google),出现如下错误:
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -MT message.lo -MD -MP -MF .deps/message.Tpo -c -o message.lo `test -f 'google/protobuf/message.cc' || echo './'`google/protobuf/message.cclibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -MT message.lo -MD -MP -MF .deps/message.Tpo -c google/protobuf/message.cc -fno-common -DPIC -o .libs/message.ogoogle/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >' return ParseFromZeroCopyStream(&zero_copy_input) && input->eof(); ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here class _LIBCPP_TYPE_VIS basic_istream; ^google/protobuf/message.cc:135:67: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >' return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof(); ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here class _LIBCPP_TYPE_VIS basic_istream; ^google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >' return output->good(); ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:110:28: note: template is declared here class _LIBCPP_TYPE_VIS basic_ostream; ^3 errors generated.make[2]: *** [message.lo] Error 1make[1]: *** [all-recursive] Error 1make: *** [all] Error 2错误提示的时,导错了,经过搜索和检查,发现需要修改
${PROTOBUF_HOME}/src/google/protobuf下的message.h文件,具体修改方式如下:
#ifdef __DECCXX
// HP C++'s iosfwd doesn't work.
#include <iostream>
#else
#include <sstream>
//#include <iosfwd>
#endif
0 0
- mac os安装protobuf 2.4错误解决方法
- Mac OS X 安装protobuf
- Protobuf-2.5.0在Mac OS时OutOfMemoryError解决方法
- mac os java中文乱码错误解决方法
- VMware11安装Mac OS X10.9.3提示不可恢复错误(vcpu-0) 的解决方法
- Vmware 11 安装 Mac OS 提示不可恢复错误(vcpu-0)解决方法
- Mac OS X 下安装CocoaPods 出现“Errno::EPERM”错误的解决方法
- Mac OS X 10.9.4编译Protobuf-2.4.1问题
- mac os下Python模块安装错误
- Mac上安装Protobuf
- mac安装protobuf
- Mac安装Protobuf
- mac上安装Protobuf
- MAC安装protobuf
- Mac 下安装pygame的错误解决方法
- mac 安装Homebrew early EOF错误解决方法
- MAC OS 下安装cocoapods安装的错误问题
- Mac安装Protobuf编译Java
- 订残开发if中的及帐词
- 【Mysql左右值】左右值法实现Mysql无限级分类-代码例子
- HashMap实现原理分析
- RHEL 4 性能优化-详述
- inserter、back_inserter、front_inserter
- mac os安装protobuf 2.4错误解决方法
- jquery图片轮播
- libGDX视频教程(六) -- 常用控件
- SQL 计算两个时间之差
- BIEE Admin Tool建模13条黄金规则
- Makefile经典入门
- 排序算法之基本排序算法:交换、选择、插入
- 全选、反选 不选
- 简单记录一次REDO文件损坏报错 ORA-00333重做日志读取块出错