BKonz | 1 Oct 17:18 2014

error in repeated_field.h:613

Hello,
I have the following Message in my .proto file:

message Control2Arm{
 required int32 command = 1;
 repeated double pose = 2;
 repeated double spd = 3;
 repeated double acc = 4;
 repeated double jrk = 5;
}

In one class I do this:

Control2Arm c2a;
    c2a.set_command(1);

  //pack pose
  for (int i = 0; i < 3; i++) {
    for (int j = 0; i < 3; i++) {
      c2a.add_pose(pose(i, j));
    }
  }
  //pack spd
  for (int i = 0; i < 3; i++) {
    c2a.add_spd(spd[i]);
  }
  //pack acc
  for (int i = 0; i < 3; i++) {
    c2a.add_acc(acc[i]);
  }
  //pack jrk
  for (int i = 0; i < 3; i++) {
    c2a.add_jrk(jrk[i]);
  }
  std::string s;
  c2a.SerializeToString(&s);


later I parse it:
Control2Arm t;
 bool parsed = t.ParseFromArray(&_str[0], _str.size());

It works when I don't use repeated in the message and only send one value. With repeated I get:
[libprotobuf FATAL /usr/local/include/google/protobuf/repeated_field.h:613] CHECK failed: (index) < (size()):

Is the error in the part I posted?

Thanks a lot.
B

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
d14b3l | 1 Oct 13:01 2014
Picon

can I use prebuild protoc.exe for C++

Hi, I know that readme says that:

"This package contains a precompiled Win32 binary version of the protocol buffer
compiler (protoc).  This binary is intended for Windows users who want to
use Protocol Buffers in Java or Python but do not want to compile protoc
themselves."

but I need confirmation that I can't use precompiled protoc.exe for Protocol Buffers in C++

Best Regards
Artur

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
d14b3l | 1 Oct 13:09 2014
Picon

can precompiled protoc.exe be used for Protocol Buffers in C++?

Hello, I know that readme.txt provided with precompiled protoc.exe says that it is intended for Windows users who want to use Protocol Buffers in Java or Python.
I wonder why it cannot be used for C++

Best Regards
Artur

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Michael Sumulong | 30 Sep 17:11 2014
Picon

Version message converted from major.minor to gnu_dev_major.gnu_dev_minor

I have a message where version information is passed and my message fields contain a uint32's for major and minor numbers (as well as patch/pre_release/build info strings along the lines of semver.org). When I use the version message type in my program, the major/minor fields show up as gnu_dev_major/gnu_dev_minor. Is this normal behavior / documented anywhere?

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
sidea | 29 Sep 12:07 2014
Picon

Re: Re: Compilation issue on Solaris 9 with CC version 5.9

Re-opening a very old thread here!

I am trying to build protocol buffers 2.3.0 on solaris using CC: Sun C++ 5.7 2005/03/01.

The configure command I have used is:

./configure --prefix=/usr/local/protobuf-2.2.0 --without-zlib --disable-64bit-solaris CFLAGS=-m32 PROTOBUF_OPT_FLAG=-O3 CXXFLAGS="-m32 -g -DNDEBUG -fno-exceptions -library=stlport4 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=Crun -template=no%extdef" LDFLAGS=-m32


I get a fair way through on the compilation but then get the unexpected type errors as above, even though I am using stlport4 - my error output is:

libtool: compile:  CC -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -O3 -m32 -g -DNDEBUG -fno-exceptions -library=stlport4 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=Crun -template=no%extdef -c google/protobuf/descriptor.cc 
CC: Warning: Option -m32 passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored otherwise
"./google/protobuf/descriptor.h", line 324: Warning: Identifier expected instead of "}".
"./google/protobuf/descriptor.h", line 343: Warning: Identifier expected instead of "}".
"./google/protobuf/descriptor.h", line 354: Warning: Identifier expected instead of "}".
"./google/protobuf/descriptor.pb.h", line 87: Error: Unexpected type name "google::protobuf::FieldDescriptorProto_Type" encountered.
"./google/protobuf/descriptor.pb.h", line 107: Error: Unexpected type name "google::protobuf::FieldDescriptorProto_Label" encountered.
"./google/protobuf/descriptor.pb.h", line 127: Error: Unexpected type name "google::protobuf::FileOptions_OptimizeMode" encountered.
"./google/protobuf/descriptor.pb.h", line 147: Error: Unexpected type name "google::protobuf::FieldOptions_CType" encountered.
"./google/protobuf/wire_format_lite.h", line 95: Warning: Identifier expected instead of "}".
"./google/protobuf/wire_format_lite.h", line 118: Warning: Identifier expected instead of "}".
"./google/protobuf/wire_format_lite.h", line 133: Warning: Identifier expected instead of "}".
"./google/protobuf/wire_format.h", line 227: Warning: Identifier expected instead of "}".
"./google/protobuf/stubs/once.h", line 115: Warning (Anachronism): Formal argument 2 of type extern "C" void(*)() in call to pthread_once(_once*, extern "C" void(*)()) is being passed void(*)().
4 Error(s) and 8 Warning(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `descriptor.lo'


Can anyone offer any ideas on what I need to do to get this sorted out?

Thanks.



On Wednesday, 11 November 2009 22:55:02 UTC, Monty Taylor wrote:
I use 2.1.0 on solaris with sun studio compiler all the time. The thing is, you cannot use Cstd, you must use stlport4. I already have the protobuf configure script injecting the CXXFLAGS for that, but if you are overriding them, it's gonna get ugly. Grep through the m4 files for stlport4 and you should see what they are (I'm on a plane else I would paste the flags you need)

If there is another issue here, I'll be interested to hear about it. If that doesn't fix it, could you show the entire compiler invocation line?

"Kenton Varda" <ken... <at> google.com> wrote:

>The warnings look harmless (it's complaining about the trailing comma after
>the last value in an enum).
>
>The errors suggest that your compiler is not very good with templates.  The
>line of code is:
>
>  return
>::google::protobuf::internal::ParseNamedEnum<FieldDescriptorProto_Type>(
>
>Apparently your compiler doesn't recognize that ParseNamedEnum is a
>template.  What compiler are you using?
>
>On Mon, Nov 9, 2009 at 7:27 PM, vikram <patil... <at> gmail.com> wrote:
>
>>
>>
>> Hello Guys,
>>
>>        I have generated protocol buffer header files and source files
>> from proto and compiled those with include files on linux without any
>> issues. Here I am trying to use same source files with same include
>> directory but on solaris so I have encountered following problems.
>> Does anyone have same issues while working with protobuf 2.1.0
>>
>> (*)() in call to pthread_once(_once*, extern "C" void(*)()) is being
>> passed void(*)().
>> "/work/$$$$/SunBuild/Server/../Tools/protobuf/include/google/protobuf/
>> descriptor.h", line 324: Warning: Identifier expected instead of "}".
>> "/work/$$$$/SunBuild/Server/../Tools/protobuf/include/google/protobuf/
>> descriptor.h", line 343: Warning: Identifier expected instead of "}".
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/descriptor.h", line 354: Warning: Identifier expected instead
>> of "}".
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/wire_format.h", line 177: Warning: Identifier expected
>> instead of "}".
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/descriptor.pb.h", line 83: Error: Unexpected type name
>> "google::protobuf::FieldDescriptorProto_Type" encountered.
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/descriptor.pb.h", line 102: Error: Unexpected type name
>> "google::protobuf::FieldDescriptorProto_Label" encountered.
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/descriptor.pb.h", line 120: Error: Unexpected type name
>> "google::protobuf::FileOptions_OptimizeMode" encountered.
>> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/
>> protobuf/descriptor.pb.h", line 138: Error: Unexpected type name
>> "google::protobuf::FieldOptions_CType" encountered.
>> 4 Error(s) and 5 Warning(s) detected.
>>
>> Thanks & Regards,
>> Vikram
>> >
>>
>
>>

Sent from my Android phone with K-9. Please excuse my brevity.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Valery Khamenya | 28 Sep 15:32 2014
Picon

protobuf2uml -- a tool to visualize protobuf architecture in UML-diagram

Hi,

I had to draw a UML-diagram visualizing protobuf architecture defined in a number of .proto files in our project. I knew that current architecture is a subject of change, so, I wasn't much motivated to annoy myself with UML-drawings once again and I wrote a tool that does this job for me:

https://github.com/vak/protobuf2uml

I would be happy if someone will find it useful too and even more happy for pull requests from you ;)

kind regards,
Valery




--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Rajesh Bhardwaj | 26 Sep 19:16 2014
Picon

Using SortedList/SortedMap in for Repeated Message - C++

Hello,
I have the following two messages - 
message KeyValuePair_Int32_ABC {
   optional int32 Key = 1;
   optional BCD Value = 2;
}

message XYZ {
   repeated KeyValuePair_Int32_ABC = 1;
   optional bool IsPersisted =2;
   optional bool IsChanged =3;
   optional bytes KeyAvro =4;
   optional bytes AddDimAvro =5;

}

I want to use boost sortedmap/sortedlist as the implementation of KeyValuePair_Int32_ABC . But I dont understand how can I do that. Any examples will be highly appreciated.
regards
 

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
protobuf | 23 Sep 20:13 2014

Re: Issue 641 in protobuf: Lots of "implicit conversion loses precision" errors.


Comment #5 on issue 641 by xiaof... <at> google.com: Lots of "implicit  
conversion loses precision" errors.
https://code.google.com/p/protobuf/issues/detail?id=641

We plan to do a minor release 2.6.1 in a month or so.

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

-- 
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 23 Sep 20:10 2014

Re: Issue 641 in protobuf: Lots of "implicit conversion loses precision" errors.


Comment #4 on issue 641 by benn... <at> focalshift.com: Lots of "implicit  
conversion loses precision" errors.
https://code.google.com/p/protobuf/issues/detail?id=641

Can you offer us an idea of what the timing for incorporation into the  
public branch might look like?  I don't really want to duplicate effort if  
this issue has already been fixed, but there was over a year between 2.5.0  
and 2.6.0 releases.

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

-- 
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 23 Sep 20:05 2014

Re: Issue 641 in protobuf: Lots of "implicit conversion loses precision" errors.


Comment #3 on issue 641 by xiaof... <at> google.com: Lots of "implicit  
conversion loses precision" errors.
https://code.google.com/p/protobuf/issues/detail?id=641

This has been fixed in our internal branch and will be included in the next  
release. You can send us a patch on our github site if you want it resolved  
soon:
https://github.com/google/protobuf/pulls

(If you decide to send us a patch, please sign this Google CLA:  
https://developers.google.com/open-source/cla/individual?csw=1)

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

-- 
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 23 Sep 06:10 2014

Re: Issue 641 in protobuf: Lots of "implicit conversion loses precision" errors.


Comment #2 on issue 641 by benn... <at> focalshift.com: Lots of "implicit  
conversion loses precision" errors.
https://code.google.com/p/protobuf/issues/detail?id=641

Has any progress been made on this issue? I am running into the same thing  
when building for the arm64 architecture with Xcode 6.  I am willing to  
help with source code edits, etc. if it will move the issue toward  
resolution.

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

-- 
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Gmane