我正在从编译一个Google插件。
我已经安装了,其中包含了homebrew命令:
brew安装protobuf@2.5
安装后,在试图通过调用make进行编译时会出现以下错误
Richards-Mac-mini:protobuf-objc-arc richard$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src/compiler
g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -DNDEBUG -MT mai
我正在为我最近的项目使用CMake,我想确认设置了正确的路径
set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR})
我使用message检查_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR的值,但没有在终端中打印任何内容
message( STATUS ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR} ) # no output for this
我的目的是构建grpc 1.14.1,它依赖于protobuf,所以我下载了protobuf 3.
我正在使用来自的Protoc-3.18.0-Win 32版本。成功编译.proto文件后,QtCreator 5 (C++11)程序中出现以下错误:
C:\Users\MyName\MyProject\lib\include\google\protobuf\stubs\mutex.h:124: error: temporary of non-literal type 'google::protobuf::internal::CallOnceInitializedMutex<std::mutex>' in a constant expression
In file i
我一直试图将protobuf类型的google.protobuf.Timestamp与protoc-jar-maven-plugin一起使用,但只获得以下编译时错误:
google/protobuf/timestamp.proto: File not found.
test.proto: Import "google/protobuf/timestamp.proto" was not found or had errors.
test.proto:9:5: "google.protobuf.Timestamp" is not defined.
proto文件如下
我使用的是Google speech github android项目。在升级了所有文件的版本后,它终于解决了一个问题,而我无法解决它。此处显示错误消息: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.8.0.jar (com.google.protobuf:protobuf-java:3.8.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1) 还有数百行类似的警告。
我尝试使用protobuf,但不知怎么链接失败了(这里只是代码片段):
Linking CXX executable app
CMakeFiles/app.dir/msg.pb.cc.o: In function `evoswarm::protobuf_AssignDesc_a_5fto_5fb_2eproto()':
msg.pb.cc:(.text+0x133): undefined reference to `google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(