Heim > Datenbank > MySQL-Tutorial > mac os安装protobuf 2.4错误解决方法

mac os安装protobuf 2.4错误解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-07 15:07:48
Original
1645 Leute haben es durchsucht

在编译安装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 messa

在编译安装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.cc
libtool: 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.o
google/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char std::__1::char_traits> >'
  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> >'
  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> >'
  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 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2</char></char></char>
Nach dem Login kopieren
错误提示的时,导错了,经过搜索和检查,发现需要修改

${PROTOBUF_HOME}/src/google/protobuf下的message.h文件,具体修改方式如下:


#ifdef __DECCXX
// HP C++'s iosfwd doesn't work.
#include
#else
#include
//#include
#endif

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Aktuelle Ausgaben
Mac-Nutzung
Aus 1970-01-01 08:00:00
0
0
0
Wie installiere ich es auf dem Mac?
Aus 1970-01-01 08:00:00
0
0
0
Warum verfügt der Mac nicht über PHPstudy?
Aus 1970-01-01 08:00:00
0
0
0
MacOS – Mac OS SPF13 VIM-Anzeigeproblem
Aus 1970-01-01 08:00:00
0
0
0
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage