Hello,
I've been scouring the interwebs for the last two days, trying to get this
to work but I seem to be getting stuck on the same issue. Though I have
looked multiple places for possible solutions, most of the solutions seem
to be targeted towards iOS devs (not me) or people using Objective-C (also
not me).
I've successfully generated a protobuf classes from a .proto file and
imported it into my project. Added "/usr/local/includes" to my header
search path and (as a probably futile attempt at resolving this) added
"/usr/local/lib" where the static libs from compiling protobuf wound up.
When I try to build my code, the code seems to compile, but then I get
linker errors like this:
Undefined symbols for architecture x86_64:
"google::protobuf::Message::GetTypeName() const", referenced from:
vtable for CueStack_ParamState in ginkgo.pb.o
vtable for CueStack_ParamTable in ginkgo.pb.o
vtable for CueStack_CueValues in ginkgo.pb.o
vtable for CueStack in ginkgo.pb.o
"google::protobuf::Message::SpaceUsed() const", referenced from:
vtable for CueStack_ParamState in ginkgo.pb.o
vtable for CueStack_ParamTable in ginkgo.pb.o
vtable for CueStack_CueValues in ginkgo.pb.o
vtable for CueStack in ginkgo.pb.o
"vtable for google::protobuf::internal::FunctionClosure0", referenced
from:
google::protobuf::internal::FunctionClosure0::FunctionClosure0(void
(*)(), bool) in ginkgo.pb.o
NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
"google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned
int*)", referenced from:
google::protobuf::io::CodedInputStream::ReadVarint32(unsigned int*)
in ginkgo.pb.o
"google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned
int)", referenced from:
google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int)
in ginkgo.pb.o
"google::protobuf::GoogleOnceInitImpl(long*,
google::protobuf::Closure*)", referenced from:
google::protobuf::GoogleOnceInit(long*, void (*)()) in ginkgo.pb.o
I have already tried changing the compiler flags when I build protobuf to
this:
./configure CC=clang CXX="clang++ -std=c++11 -stdlib=libc++" CXXFLAGS="-O3"
based on this discussion:
https://groups.google.com/forum/#!msg/protobuf/oEQVT8pdr5I/HWWdqgbvADUJ
this isn't resolving my issue.
Any advice is greatly appreciated since protobuf looks like it could
resolve a lot of my serialization needs, more elegantly and json.
Thank you!
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.