protobuf-objc
protobuf-objc copied to clipboard
Can't build protobuf-objc compiler
I'm having protobuf 3.4.1 currently installed but now i need objective-c support too. So i've cloned repo, built and installed protobuf-objc using ./scripts/build.sh as described.
Anyway there is some problem in build and installed:
*make && make install
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src/compiler
g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/include -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
mv -f .deps/main.Tpo .deps/main.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/include -MT objc_enum_field.o -MD -MP -MF .deps/objc_enum_field.Tpo -c -o objc_enum_field.o objc_enum_field.cc
In file included from objc_enum_field.cc:18:
./objc_enum_field.h:67:21: error: no template named 'map'; did you mean
'std::map'?
map<string, string> variables_;
^~~
std::map
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tree:1454:78: note:
'std::map' declared here
...<class, class, class, class> friend class LIBCPP_TYPE_VIS_ONLY map;
^
In file included from objc_enum_field.cc:18:
./objc_enum_field.h:108:21: error: no template named 'map'; did you mean
'std::map'?
map<string, string> variables;
^~~
std::map
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tree:1454:78: note:
'std::map' declared here
...<class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
^
In file included from objc_enum_field.cc:25:
In file included from /usr/local/include/google/protobuf/wire_format.h:44:
./google/protobuf/descriptor.pb.h:17:2: error: This file was generated by an
older version of protoc which is
#error This file was generated by an older version of protoc which is
^
./google/protobuf/descriptor.pb.h:18:2: error: incompatible with your Protocol
Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
./google/protobuf/descriptor.pb.h:19:2: error: regenerate this file with a newer
version of protoc.
#error regenerate this file with a newer version of protoc.
^
objc_enum_field.cc:35:31: error: no template named 'map'; did you mean 'Map'?
map<string, string> variables) {
^~~
Map
/usr/local/include/google/protobuf/map.h:122:7: note: 'Map' declared here
class Map {
^
objc_enum_field.cc:57:9: error: no matching function for call to
'SetEnumVariables'
SetEnumVariables(descriptor, file, &variables_);
^~~~~~~~~~~~~~~~
objc_enum_field.cc:33:14: note: candidate function not viable: no known
conversion from 'map<string, string> *' (aka 'map<basic_string<char,
char_traits
I have also this problem,how can you slove it