protobuf-c - 找不到 protobuf 头文件
问题描述
我在我的 ios 应用程序中 pod Protobuf-C++,但是构建失败,构建错误日志看起来像这样
- NOTE | [iOS] xcodebuild: Protobuf-C++/src/google/protobuf/io/zero_copy_stream.cc:35:10: fatal error: 'google/protobuf/io/zero_copy_stream.h' file not found
- NOTE | [iOS] xcodebuild: Protobuf-C++/src/google/protobuf/wrappers.pb.cc:4:10: fatal error: 'google/protobuf/wrappers.pb.h' file not found
有人知道如何解决这个问题吗?我的 protobuf 版本是 3.11.3
解决方案
'google/protobuf/any.h' file not found
'google/protobuf/arena_test_util.h' file not found
'google/protobuf/util/delimited_message_util.h' file not found
也许没有找到其他文件。解决方法:
1. select 'Pods'
2. select 'Protobuf-C++'
3. select 'Build Settings'
4. search 'search path'
5. select 'Header Search Paths'
6. add '$(SRCROOT)/Protobuf-C++/src'
推荐阅读
- quasar-framework - 在 notify() 通知失败
- powershell - Powershell远程路径+通配符问题
- c - setuid 和 setgid wotking 仅使用 0(root),我希望它可以为其他用户工作
- r - 根据 R 中某一列的值拆分数据框
- java - 如何创建一个新的 TextView 并显示它?(带编程)
- python - 游戏中的用户名和密码验证
- python - 如何将 CBV login_required 重定向到特定路由?
- regex - 正则表达式解释 smtlib2 格式
- python - 部署在 Heroku 上的网络抓取脚本没有输出
- c++ - 奇怪的派生分配器行为