gpt4 book ai didi

ios - 在 Xcode 中使用两个框架时出错

转载 作者:行者123 更新时间:2023-11-29 02:13:52 24 4
gpt4 key购买 nike

我需要在我的 Xcode 项目中使用两个第三方框架,但它们中的两个使用 Google 的 Protocol Buffer 库,并且它们是针对该库的不同版本编译的。这两个框架单独运行良好,但当我尝试在同一个项目中使用它们时,我收到此错误消息:

[libprotobuf FATAL /Users/jari/dev/indooratlas-sdk/indooratlas-ios-sdk/target/framework/IDAAlgorithm/cpp-algorithms/cpp/protobuf/protobuf-cmake/protobuf-2.6.0/src/google/protobuf/stubs/common.cc:72] This program was compiled against version 2.4.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (2.6.0).  Contact the program author for an update.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "".)
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: This program was compiled against version 2.4.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (2.6.0). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "".)

错误消息指出我应该联系程序作者以获得更新,但我想知道我是否可以做些什么来解决这个问题。

最佳答案

如果您有框架的源代码,您应该能够使用最新版本的 Protobufs 编译它们。您将需要使用最新的 protoc 重新生成所有 .pb2.cc.pb2.h 文件并链接到最新的库版本.

如果您没有框架的源代码,则需要联系作者并要求他们针对较新的 Protobufs 进行编译。没有代码,您自己无法做到这一点。

关于ios - 在 Xcode 中使用两个框架时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28976808/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com