objective c - Can't build GCM with Protobuf in Xcode -


recently i've decided integrate gcm project uses google protocol buffers. worked fine, sample ok. when i've tried integrate gcm via cocoapods project - started receiving build errors:

undefined symbols architecture x86_64: "_gsdk_pblogicalrightshift32", referenced from:   _serializedsize in libgcmlib.a(gcmsecuresocket.o) "_objc_class_$_gsdk_pbcodedoutputstream", referenced from:   objc-class-ref in libgcmlib.a(gcmsecuresocket.o) "_objc_class_$_gsdk_pbdescriptor", referenced from:   objc-class-ref in libgcmlib.a(gtalkcore.pb.o)   objc-class-ref in libgcmlib.a(gtalkextensions.pb.o) "_objc_class_$_gsdk_pbgeneratedmessage", referenced from:   _objc_class_$_gtalkheartbeatping in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkheartbeatack in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkerrorinfo in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalksetting in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkloginrequest in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkloginresponse in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkclose in libgcmlib.a(gtalkcore.pb.o)   ... "_objc_class_$_gsdk_pbrootobject", referenced from:   _objc_class_$_gtalkgtalkcoreroot in libgcmlib.a(gtalkcore.pb.o)   _objc_class_$_gtalkgtalkextensionsroot in libgcmlib.a(gtalkextensions.pb.o) "_objc_metaclass_$_gsdk_pbgeneratedmessage", referenced from:   _objc_metaclass_$_gtalkheartbeatping in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkheartbeatack in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkerrorinfo in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalksetting in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkloginrequest in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkloginresponse in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkclose in libgcmlib.a(gtalkcore.pb.o)   ... "_objc_metaclass_$_gsdk_pbrootobject", referenced from:   _objc_metaclass_$_gtalkgtalkcoreroot in libgcmlib.a(gtalkcore.pb.o)   _objc_metaclass_$_gtalkgtalkextensionsroot in libgcmlib.a(gtalkextensions.pb.o)  ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) 

i've assumed because gcm library has protocolbuffers in , conflicting protobuf sources i've got here: https://github.com/google/protobuf/tree/master/objectivec

i've tried build device , result receive similar error - armv7 instead of x86_64. must say, sample project works fine, think protobuf main issue here. still, have no idea how resolved. thoughts?

check if architecture of libgcmlib.a , target build architecture same.

you can check architecture of .a file command

otool -hv libgcmlib.a

apprarently following objects not built against x86_64 architecture.

gcmsecuresocket.o gtalkcore.pb.o ... 

how build libgcmlib.a static lib ? review it.


Comments

Popular posts from this blog

php - Array to string conversion smarty template -

Winapi c++: DialogBox hangs when breaking a loop -