简体   繁体   中英

iOS 5 , Xcode 4.2 and ProtoBuf

I'm trying to compile google protobuf protocol for using it in my iOS 5 project, but with no success yet... I found only one blog post about the topic here . But when I try this method I receive error:

h-3.2# make
make all-recursive
Making all in .
make[2]: Nothing to be done for `all-am’.
Making all in src
protoc -I. –cpp_out=. google/protobuf/unittest.proto google/protobuf/unittest_empty.proto google/protobuf/unittest_import.proto google/protobuf/unittest_mset.proto google/protobuf/unittest_optimize_for.proto google/protobuf/unittest_embed_optimize_for.proto google/protobuf/unittest_custom_options.proto google/protobuf/unittest_lite.proto google/protobuf/unittest_import_lite.proto google/protobuf/unittest_lite_imports_nonlite.proto google/protobuf/unittest_no_generic_services.proto google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
google/protobuf/unittest.proto:490:46: Expected number.
google/protobuf/unittest.proto:491:51: Expected number.
google/protobuf/unittest.proto:492:46: Expected number.
google/protobuf/unittest.proto:493:44: Expected number.
google/protobuf/unittest.proto:494:49: Expected number.
google/protobuf/unittest.proto:495:44: Expected number.
make[2]: *** [unittest_proto_middleman] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I have worked old project with protobuf but it is created in xcode 3.x. Is there a way or some tutorial how to use it in xcode 4.2 and armv7 architecture? I lose 2 days of my project time to research the problem and still no success... My project deadline is soon and I have no chance to proceed without this protobuf...

您是否尝试过使用Objective-C协议缓冲区

This blog post gives the instructions on how to compile the protobuf library with armv7, armv7s, i386 architectures for iOS. There is also a link in the blog post to download a precompiled iOS library for protobuf that works on the device as well as the simulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM