Protocol Buffer as XCode Framework

961 views
Skip to first unread message

Carlos Gamboa

unread,
Oct 16, 2008, 12:41:33 PM10/16/08
to Protocol Buffers
Hello. I am trying to add the protocol buffer to my application (for
iphone) and i have been struggling for about 2 days to figure out how
to do it. I am new to XCode too by the way. I tried creating a
framework like Brian Olson suggested on this post:
http://groups.google.com/group/protobuf/browse_thread/thread/65e781a5e8d6fc06#
, but i do not know all the things i need to include this framework.
Here are the steps im following.
1. Compile the protobuf project
2. On my project, right click on Frameworks and click 'add->existing
frameworks' and then locate the 'macosx/build/release/
protobuf.framework' folder. The framework is located at the documents
folder (documents/macosx)
3. I created my .pb.h and .pb.c with the 'protoc' program and added
them to my project.
4. I try to compile, but the following 18 errors appear like this:
"google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced
from:
myNamespace::myProto::myProto() in myProto.pb.o
...

I really dont care if i add it as a framework or as direct code, but i
have not been able to include the protocol buffer as part of my
project. Can anyone please help me?

Kenton Varda

unread,
Oct 16, 2008, 4:41:59 PM10/16/08
to Carlos Gamboa, Protocol Buffers
I'm not sure how mac frameworks work, but it looks like your compiler is not linking against the protobuf library.

gur...@gmail.com

unread,
Dec 1, 2008, 6:55:05 PM12/1/08
to Protocol Buffers
Were you finally able to use protocol buffers in your iphone
application ?

On Oct 16, 8:41 am, Carlos Gamboa <cgamboa...@gmail.com> wrote:
> Hello. I am trying to add the protocol buffer to my application (for
> iphone) and i have been struggling for about 2 days to figure out how
> to do it. I am new to XCode too by the way. I tried creating a
> framework like Brian Olson suggested on this post:http://groups.google.com/group/protobuf/browse_thread/thread/65e781a5...

rivera

unread,
Dec 11, 2008, 4:19:20 PM12/11/08
to Protocol Buffers
Carlos,

In which program is your project written? Is it Objective-C?

Probably your problem isn't on linking the library itself... if your
project is written in Objective-C remember that linking with C++ code
requires a .mm extension for your Objective-C code!

Give it a try ;)

micahp...@gmail.com

unread,
Dec 11, 2008, 5:05:39 PM12/11/08
to Protocol Buffers
also realize that frameworks you create won't work with the iphone --
you need to create a static library.
Reply all
Reply to author
Forward
0 new messages