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
0 answers

Unable to build C++ project w/ protobuf

I'm having trouble figuring out how to build a project with C++ protobufs. I'm on arm Mac and followed the instructions here to the T but keep on getting the error shown below when trying to build my project. g++ -std=c++20 main.cpp test.pb.cc…
Nate K
  • 69
  • 6
1
vote
1 answer

gRPC giving linkage errors in c++

I am writing a program using gRPC in the language c++. I have installed gRPC using the command brew install grpc on a MacOS I also have the most up to date version of protobuf. When I create a basic program using gRPC I compile them using the…
Sam Moldenha
  • 463
  • 2
  • 11
1
vote
1 answer

Wrong protobuf deserialization on ARMv7

Note: I am completely new to working with different cpu architectures and working with C / gcc I am trying to create an application written in plain C, which receives UDP messages from a server that are serialized as a protobuf. The implementation I…
Manu
  • 284
  • 2
  • 20
1
vote
0 answers

File already exists in database error from protobuf while using on Amazon Linux

We are using protobuf messages to use in Zsockets on AWS Linux machines. We have 3 protobuf files in the same directory. 2 protobuf files are importing the 3rd file. Protobuf files are as below. Fs.proto : syntax = "proto3"; option java_package =…
kadina
  • 5,042
  • 4
  • 42
  • 83
1
vote
0 answers

Any optimization in creating protobuf callback

I just started to do some rpc releating things. When creating a async call, I have to call a NewCallback For example // See Closure. template inline Closure* NewCallback(Class* object, void…
1
vote
1 answer

Defined required fields in proto3

I am using protobuf with version3 in Php. Below is my proto file syntax ="proto3"; package message.events.user.v1; message UserWasActivatedMessage { int32 userId = 1 ; string eventType = 2; } This is my proto file and whenever I do not set…
ujwal dhakal
  • 2,289
  • 2
  • 30
  • 50
1
vote
1 answer

Will changing the ProtoBuffer Varint type from a bool type to an enum type representing all bit-mask values be forward compatible?

I want to make the following ProtoBuffer message to be forward compatible. The current Storage message defines a state field as a bool type: message Storage { bool state = 1; } In the Protobuffer encoding, it encodes the Varint types like the…
ecle
  • 3,952
  • 1
  • 18
  • 22
1
vote
1 answer

FAIL: protobuf-test

sudo apt-get install autoconf automake libtool curl make g++ unzip https://github.com/protocolbuffers/protobuf/releases/latest git clone https://github.com/protocolbuffers/protobuf.git cd protobuf git submodule update --init…
human
  • 11
  • 2
1
vote
0 answers

Error while using protobuf-cpp as a dependency to JNI

I am using libpg_query from Scala. To do so I created a JNI API which uses Protobuf to communicate with the library. Unfortunately SBT build occasionally crashes the whole JVM due to an uncaught exception from the libpg_query. [libprotobuf ERROR…
Vojtech Letal
  • 2,168
  • 3
  • 13
  • 17
1
vote
0 answers

Visual studio code 2019 and protobuf cpp code

I want to run the grpc in visual studio without cmake. I followed these steps: create New project in VIsual Studio 2019 I added helloWorld.proto file in proto folder created by pb.cc and pb.h, and grpc.pb.cc and grpc.h through protoc and…
Piu
  • 19
  • 5
1
vote
0 answers

Protobuf-c: Nesting a message within a message creates a structure pointer

I am new to protobuf usage. I am trying the following with protobuf-c to include a message within another message. It generated a structure pointer as below: message Check { bool check_valid = 1; } message main_check { Check chk =…
1
vote
1 answer

Should the Protobufs from two different repositories be aligned

Problem Description We have two codes on different repositories. One is in Java and the Other is in C++. We share a common protobuf. The problem is that on our side which is the C++ side we have less members that the one on the JAVA side. As you can…
Hani Gotc
  • 840
  • 11
  • 24
1
vote
0 answers

Unable to unpack the data if data is greater than 64bytes in Protocol buffer

Im unable to unpack the data if PeriodAndControlByte is greater than 15.please look at my code snippet. proto file is written in the below format message LockingPlanAutoChanges { uint32 RecordPointer = 1; repeated uint32…
samatha2
  • 11
  • 1
1
vote
1 answer

Nanopb: Submessage decoding results in incorrect data

I have various sensor types running, creating periodic events and publishing the data online. There's an overall event structure containing information about the sensor and a submessage containing data depending on what type of sensor it is. The…
1
vote
0 answers

Protobuf version conflict when linking with libpulsar.so

I am trying to build c++ code that will use protobuf to serialize the data and send to pulsar message queue. I have written a protobuf protocol file and autogenerated a c++ code. I am building the code as this - /usr/bin/g++ -g --std=c++11…
punekr12
  • 653
  • 2
  • 7
  • 14