In proto file I have one enum like I am converting it c++ code It throws error Integer out of range for field(_G,_P,_L) . In https://developers.google.com/protocol-buffers/docs/proto3#enum says "Enumerator constants must be in the range of a 32-bit integer" . Please help me fix this issue
enum field are
pb_EnumTargetType_A = 0x40000000;
tpb_EnumTargetType_G = 0x88000000;
tpb_EnumTargetType_P = 0x8C000000;
tpb_EnumTargetType_L = 0x8A000000;
I guess it is interpreting this as a positive number, which would therefore require more than 32-bits to encode as a signed integer. Writing it as a signed integer seems to work:
pb_EnumTargetType_A = 0x40000000;
tpb_EnumTargetType_G = -2013265920; // 0x88000000
tpb_EnumTargetType_P = -1946157056; // 0x8C000000
tpb_EnumTargetType_L = -1979711488; // 0x8A000000