0

I successfully install protobuf on MacOS, but when running the examples in the git repository, I receive some errors but only one is shown below.

make cpp

pkg-config --cflags protobuf  # fails if protobuf is not installed
-pthread -I/usr/local/include
c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
In file included from add_person.cc:5:
In file included from /usr/local/include/google/protobuf/util/time_util.h:45:
In file included from /usr/local/include/google/protobuf/duration.pb.h:23:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:135:
/usr/local/include/google/protobuf/stubs/common.h:190:17: error: expected expression
  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
                 ^

however, when I install protobuf on my ubuntu desktop, the examples can be make and executed correctly.

4

0 回答 0