Pat*_*cia 5 command-line protocol-buffers ios
我正在尝试按照这些说明安装 Google Protocol Buffers。创建脚本后,我尝试使用以下命令运行它:
$ ./build-proto-ios.sh
Run Code Online (Sandbox Code Playgroud)
我收到以下输出:
mkdir: ios-build: File exists
Platform is iPhoneSimulator
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
Platform is iPhoneOS
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
Platform is iPhoneOS
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: ios-build/libprotobuf-lite-armv7.a (No such file or directory)
Run Code Online (Sandbox Code Playgroud)
于是,我查找了以下信息:
无法找到实用程序“make”,不是开发人员工具或在 PATH 中
我找到了安装 Xcode 命令行工具的信息,因为我认为这可能是原因。但即使在安装了 OS X Mavericks 的最新命令行工具后,我仍然收到此错误。
有任何想法吗?
小智 5
1) xcode-select -p -> /Applications/Xcode.app/Contents/Developer
2) sudo xcode-select --switch /Library/Developer/CommandLineTools
3) xcode-select -p -> /Library/Developer/CommandLineTools
4) 评估“$(rbenv init -)”
5)rbenv安装2.5.3
6) rbenv 本地 2.5.3
另外,请查看 xcode 是否已正确更新
小智 1
看来这不是你的实际问题。当脚本运行时,它会在 iOS 6 文件夹中查找包含的 make...该文件夹可能不存在。
查看https://gist.github.com/PR3x/0fde040902ed4e9a1a61的脚本,该脚本将为您构建 protobuf 作为胖库。只需将其放在一个新文件夹中,chmod +x,然后运行即可。(基于/sf/answers/1370787771/)
需要注意的一件事是,您需要更改所有生成的.pb.*
文件以使用::google_public:
名称空间而不是::google:
,因为 Apple 在内部使用它。
另一件需要注意的是,这仅适用于 32 位 ARM 和模拟器。64 位 ARM (iPhone 5s) 尚未构建。
祝你好运!
归档时间: |
|
查看次数: |
15764 次 |
最近记录: |