Questions tagged [protobuf-c]

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data

in this context, protobuf-c is strong related to c because the automatically generated code is C headers and implementation.

From the official site:

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

205 questions
1
vote
3 answers

failed to find protobuf header file

I pod Protobuf-C++ in my ios app, but build failed, build error log looks like this - 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 -…
allen
  • 21
  • 4
1
vote
1 answer

How to access the value of a field in protobuf using field number in c++

let's say there is a situation like this, message A { ... } message C { optional A a_in_c = 1; } message D { optional A a_in_d = 1; } Need to write a template function, template void foo (T t) { // here T can be C or D. and need…
Ranjan M.N
  • 11
  • 3
1
vote
1 answer

How to get gRPC / protobuf version programmatically?

Is there an API to know gRPC/protobuf version or the git commit hash? We would like to include these in --version information of our C++ application. The files gRPC-Core.podspec, gRPC-C++.podspec, Protobuf-C++.podspecetc. do have this information;…
Curious
  • 2,783
  • 3
  • 29
  • 45
1
vote
1 answer

Mismatched libraries in Debian Buster?

Note: all this work is being done on a closed network (i.e. no internet access). I am being bitten by the GCC 5.0+ STL changes that occurred. It has been stated is other posts that starting in GCC 5.0 the Standard Template Libraries went through an…
1
vote
1 answer

Error on build google protobug lib for Android

I want to use protobuf in native c++ code in Android. I have done the steps descriped in https://developers.google.com/cardboard/develop/c/protobuf . But it stucks on cross compiling the protobuflib…
Coder
  • 25
  • 3
1
vote
1 answer

import proto in another library

I am developing a c++ library B which depends on another library A. The two libray both use protobuf to define message objects For example, // A.proto in library `A package libA; message ObjA {...} And I want to use it in library B // B.proto in…
Laine
  • 179
  • 1
  • 8
1
vote
0 answers

ProtoBuf: How to reuse FieldDescriptor for new Messages? How to efficiently get field values from dynamic Messages?

I’m currently working on a project in which I want to use Google Protocol Buffers (C++) to serialize and deserialize data. The application has the following requirements: One requirement is to NOT use the standard approach of generating…
1
vote
1 answer

How can I replace the conda package for libprotobuf with the cloned GitHub version within a conda environment

I am trying to install caffe within a conda environment. Caffe needs Google's protobuf package. I had already git clone'd protobuf and have it within my \usr directories. However, when I try to install caffe within the conda environment, the version…
user1245262
  • 6,968
  • 8
  • 50
  • 77
1
vote
1 answer

decompiling a bin file of protobufs-net

i have a serialized bin file of protobufs, written mainly in protobufs-net. i want to decompile it, and see the structure of it. i used some toolds like : https://protogen.marcgravell.com/decode and i also used protoc: protoc --decode_raw <…
alone
  • 169
  • 7
1
vote
1 answer

Store protobuf byte type inside a binary file

I'm trying to split and combine a binary file, for a reason not related to this question i'm using protobuf to store the files char* in a protobuf byte type The code to serialize char* looks like this: char* buffer = new char[buffer_size]; ifstream…
scroobius
  • 662
  • 2
  • 7
  • 25
1
vote
1 answer

How data is sent from client to (multi-service) server in gRPC

I am using the gRPC client server framework in one of my application (speech recognition). There are a few important things I want to clarify with my observations. 1. How the optional data field sent, when it is not populated by the client? Let's…
RC0993
  • 898
  • 1
  • 13
  • 44
1
vote
1 answer

protobuf successfully installed but cannot import

I installed tensorflow 1.13.1 and protobuf 3.6.1. successfully. But when I tried to import protobuf 3.6.1, an error occurs. I used python 3.6.0 Error is given below: import protobuf Traceback (most recent call last): File "", line 1, in…
Jinu Joseph
  • 542
  • 1
  • 4
  • 17
1
vote
1 answer

Google Speech recognition (cpp samples): undefined reference to AssignDescriptors()

This seems to be a protobuf linking error. I am describing the steps that I followed to get here. NOTE: Following links are to install the protocol buffer compiler and gRPC. If you already have a running gRPC system then you can skip it I have…
RC0993
  • 898
  • 1
  • 13
  • 44
1
vote
0 answers

undefined reference when using distcc in CMAKE for Protobuf

I am able to cmake protobuf directly, but want to do it via distcc and all the times, it is throwing error as undefined reference to I addedCXXFLAGS="-static-libstdc++" to the configure and triggered the cmake. Still getting the same error Any…
stackjohnny
  • 645
  • 3
  • 7
  • 22
1
vote
1 answer

Way to Reference Arbitrary Field in Protobuf Message

I'm looking for a string representation of arbitrary fields inside protocol buffer messages. Is there any library that implements this? I've looked at using field masks, however they don't have a strong support for repeated fields.