我正在尝试编译 google protobuf 协议(protocol)以便在我的 iOS 5 项目中使用它,但还没有成功...我只找到一篇关于该主题的博客文章 here .但是当我尝试这种方法时,我收到错误:
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
我曾使用 protobuf 处理旧项目,但它是在 xcode 3.x 中创建的。 有没有办法或一些教程如何在 xcode 4.2 和 armv7 架构中使用它? 我浪费了 2 天的项目时间来研究问题,但仍然没有成功......我的项目截止日期很快,没有这个 protobuf 我就没有机会继续......
最佳答案
您是否尝试过使用 Objective-C protocol buffers ?
关于iphone - iOS 5、Xcode 4.2 和 ProtoBuf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9243974/