'nanopb not applying options
I have the following proto definition
syntax = "proto3";
message SimpleMessage {
repeated int32 lucky_numbers = 1;
}
and options file
SimpleMessage.lucky_numbers max_size:10 fixed_length:true
I run protoc with the following
protoc --plugin=protoc-gen-nanopb=nanopb/generator/protoc-gen-nanopb ./simple.proto "--nanopb_out=-v -f simple.options:."
and it correctly picks up options (don't know why it prints the same stuff twice)
Options for SimpleMessage.lucky_numbers: max_size: 10
proto3: true
fixed_length: true
Now when I check the generated simple.pb.h, I see that
/* Struct definitions */
typedef struct _SimpleMessage {
pb_callback_t lucky_numbers;
} SimpleMessage;
I was expecting int32_t lucky_numbers[10]; as the documentation indicated. Any idea where I went wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
