谷歌语音识别(cpp示例):对AssignDescriptors()的未定义引用



这似乎是一个protobuf链接错误。我正在描述我走到这里的步骤。

注意:以下链接用于安装协议缓冲区编译器和gRPC。如果你已经有一个正在运行的gRPC系统,那么你可以跳过它

  • 我已经按照各自重要链接中提到的步骤成功安装了protobuf和grpc。

    1。https://github.com/grpc/grpc/blob/master/BUILDING.md

    2。https://github.com/grpc/grpc/tree/master/src/cpp

    3。https://github.com/protocolbuffers/protobuf

注意:以下链接用于获取并运行谷歌为语音识别应用程序提供的示例代码

  • 在克隆回购https://github.com/GoogleCloudPlatform/cpp-docs-samples/tree/master/speech/api并遵循步骤1-9

在步骤9-make run_tests上,我得到了这个错误

g++ transcribe.o parse_arguments.o googleapis.ar -L/usr/local/lib `pkg-config --libs grpc++ grpc` -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed -lprotobuf -lpthread -ldl -o transcribe
/usr/local/lib/libgrpc++_reflection.so: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::AssignDescriptorsTable*)'
/usr/local/lib/libgrpc++_reflection.so: undefined reference to `google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable*, void (* const*)(), int)'
collect2: error: ld returned 1 exit status
  1. 我无法检查AssignDescriptorsAddDescriptors是否正确声明和定义在哪里可以找到这些声明的函数

  2. 是否有我缺少的标志或链接需要添加?

如有任何积极帮助,我们将不胜感激。感谢

我观察到grpc++1.19版本不支持protobuf-c版本15

为了实现这一点,我将符号链接指针从libprotobuf-c.so.15更改为libprotobuf-c.so.17

相关内容

  • 没有找到相关文章

最新更新