我已经遵循了这个:http://code.google.com/p/metasyntactic/wiki/ProtocolBuffers
我能够编译Person.proto文件
将.h和.m文件添加到我的静态lib项目(libIOS)
UI项目引用了libIOS
现在当我编译时,我在UI项目中得到以下错误
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_PBExtensionRegistry", referenced from:
objc-class-ref in libIOS.a(Person.pb.o)
"_OBJC_CLASS_$_PBGeneratedMessage", referenced from:
_OBJC_CLASS_$_Person in libIOS.a(Person.pb.o)
"_OBJC_CLASS_$_PBGeneratedMessage_Builder", referenced from:
_OBJC_CLASS_$_Person_Builder in libIOS.a(Person.pb.o)
"_OBJC_CLASS_$_PBMutableExtensionRegistry", referenced from:
objc-class-ref in libIOS.a(Person.pb.o)
"_OBJC_CLASS_$_PBUnknownFieldSet", referenced from:
objc-class-ref in libIOS.a(Person.pb.o)
"_OBJC_IVAR_$_PBGeneratedMessage.memoizedSerializedSize", referenced from:
-[Person serializedSize] in libIOS.a(Person.pb.o)
"_OBJC_METACLASS_$_PBGeneratedMessage", referenced from:
_OBJC_METACLASS_$_Person in libIOS.a(Person.pb.o)
"_OBJC_METACLASS_$_PBGeneratedMessage_Builder", referenced from:
_OBJC_METACLASS_$_Person_Builder in libIOS.a(Person.pb.o)
"_computeInt32Size", referenced from:
-[Person serializedSize] in libIOS.a(Person.pb.o)
"_computeStringSize", referenced from:
-[Person serializedSize] in libIOS.a(Person.pb.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
项目libIOS符合罚款无错误
项目用户界面提供了上述错误