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
0
votes
1 answer

Using "string_view" to represent the "string" key

When I use map kv; in protobuf 3.8.0, the next code works: std::string_view key("key"); kv[key] = "value"; While in protobuf 3.19.4, the above code doesn't work. The error msg is: error: no match for 'operator[]' (operand types are…
Derfei
  • 3
  • 1
0
votes
0 answers

Keras model.fit throws Segmentation Fault with error- libprotobuf FATAL CHECK failed: (value.size()) <= (kint32max)

I am trying to train a simple tensorflow model on emr cluster with around 9000 parameters. But When I try to train the model it throws following error. I tried increasing the memory and decreasing the batch size. But it didn't help. libprotobuf…
Mukul
  • 310
  • 1
  • 6
  • 13
0
votes
0 answers

Build opentelemetry-cpp results in errors

I am trying to compile opentelementry-cpp project (https://github.com/open-telemetry/opentelemetry-cpp) but it results in errors. This are the commands I am running: RUN git clone -b v1.1.1 https://github.com/open-telemetry/opentelemetry-cpp otel &&…
MrPython
  • 162
  • 1
  • 8
0
votes
1 answer

Why does calling methods on a protobuf Message throw a pure virtual method called error?

I'm trying to use the Google Protobuf library and I want to store a bunch of different message types together in a container and get their names as I pull them out of the container. I think I can use the interface type google::protobuf::Message to…
0
votes
0 answers

Would it be possible to use golang protobuf client to call C++ protobuf server?

I need to use an existing C++ backed protobuf server (need to connect with unix socket) to receive protobuf requests. And I want to use golang as the protobuf client to send request to the server. However I found the autogenerated message definition…
cynkiller
  • 73
  • 9
0
votes
1 answer

Issue parsing protocol buffer ANY data in C++

I am new to protocol buffers and I am having issues with multiple messages using Any data. I am not sure if I am using it correctly. I have the following in message.proto import "google/protobuf/any.proto"; message config { string ip = 1; …
Gatothgaj
  • 1,633
  • 2
  • 16
  • 27
0
votes
1 answer

The funciton Add of C++ protobuf generates errors

I'm using C++14 with protobuf to code. In my proto file, I designed a nested message as below: message Object { // something }; message Response { repeated Object list = 1; }; In my C++ project, I try to insert an element: Object…
Yves
  • 11,597
  • 17
  • 83
  • 180
0
votes
0 answers

how to convert csv file to binary file using google protocol buffer in C++

I had studied it, conceptually I have a basic knowledge but practically I am finding it difficult. I am finding difficult in importing the library, I am new to this, so how to convert the csv file into binary file using google protocol buffer in C++
0
votes
1 answer

protobuf : The object created by add has the same member

This is the proto: message GetIdKeyValueResp { optional int32 ret = 1; repeated IpInfo ips = 2; } message IpInfo { optional string ip = 1; optional string status = 2; optional uint64 update_time = 3; optional Disks disks = 4; } message…
q57259028
  • 59
  • 6
0
votes
1 answer

What is the cause for this invalid path issue when trying to run cpp protocol buffer compiler from CMake on Windows 10 and how can I solve it?

I'm trying to build the aasdk project on a Windows 10 computer. To do this, I am attempting to run the following commands in the root of the git repo directory: mkdir buildDir cd buildDir cmake ..\ cmake --build . --config Release The last command…
0
votes
1 answer

C++ proto2 "expression is not assignable" error

I am trying to figure out how to assign a message field in protobuf2 in C++. Here is a small snippet of the code. message Sub { optional double x = 1 [[default = 46.0]; } message Master { optional Sub sub_message; } Now when I try to…
yuqli
  • 4,461
  • 8
  • 26
  • 46
0
votes
0 answers

Remove protobuf-lite C++ compiled path string from binary dll

This question is the same with the problem with Remove protobuf c++ compiled path string from binary. I'm using Protobuf 3.15.8 lite in Visual Studio 2017. I compiled lite version .lib and compiled my own dll to translate between C++ dll with C#…
0
votes
1 answer

How to generate validators file only for message that contains validate rules?

How to generate validator file only for message that contains validates rules ? In the example below, actually sbt compilation generates 4 scala classes: one for protobufA, one for protobufB and one validator message for both. int32 id = 1; …
FTK
  • 43
  • 4
0
votes
3 answers

How to get the next enum value from an enum in protobuf?

I have a protobuf message with non-consecutive enum values something like this: message Information { enum Versions { version1 = 0; version2 = 1; version3 = 10; version4 = 20; version5 = 30; …
Doraemon
  • 109
  • 1
  • 7
0
votes
1 answer

grpc proto file genertion to c++ issue

I generated this proto file using protoc. protoc -I=C:\proto --cpp_out=C:\proto C:\proto\test.proto syntax = "proto3"; option java_package = "ex.grpc"; package mathtest; // Defines the service service MathTest { // Function invoked to send…