Projectにprotobuf
class"xxx.pb.h"
を追加しました。"xxx.pb.cc"
にパスを追加し、 にパスを"/usr/local/include"
追加しHeader Search Paths
ました"/usr/local/lib"
Library Search Paths.
ビルド時に次のエラーが発生しました。
ld: warning: ignoring file /usr/local/lib/libprotobuf.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libprotobuf.dylib
ld: warning: ignoring file /usr/local/lib/libprotoc.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libprotoc.dylib
Undefined symbols for architecture i386:
"google::protobuf::DescriptorPool::generated_pool()", referenced from:
protobuf_AssignDesc_person_2eproto() in person.pb.o
"google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int)", referenced from:
protobuf_AddDesc_person_2eproto() in person.pb.o
"google::protobuf::MessageFactory::generated_factory()", referenced from:
protobuf_AssignDesc_person_2eproto() in person.pb.o
... ... ...
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for google::protobuf::Message", referenced from:
google::protobuf::Message::Message() in person.pb.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)