Re: [protobuf] Re: MSVC 2010 x64 build fails tests
Strange, looks like the serialization parsing are completely broken in MSVC 2010. Have you ever installed early versions? Could you please try a clean build? On Tue, May 10, 2011 at 8:53 PM, Mark S m...@bakedbeans.com wrote: This also fails with the new 2.4.1 release using MSVC 2010 SP1. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 290 in protobuf: Cannot compile Google Protocol Buffers on z/OS
Updates: Status: NeedPatchFromUser Cc: ury.se...@gmail.com Comment #1 on issue 290 by liuj...@google.com: Cannot compile Google Protocol Buffers on z/OS http://code.google.com/p/protobuf/issues/detail?id=290 Could you please send a patch for this? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Issue 291 in protobuf: PluginMain is not exported in DLL version
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 291 by msome...@gmail.com: PluginMain is not exported in DLL version http://code.google.com/p/protobuf/issues/detail?id=291 What steps will reproduce the problem? 1. Compile protoc protobuf with PROTOBUF_USE_DLLS 2. Try to write protoc-plugin (like this one http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.compiler.plugin.html) and call google::protobuf::compiler::PluginMain() Ofcourse link against protoc protobuf 3. Try to link this program What is the expected output? Link successfull. What do you see instead? main.obj : error LNK2019: unresolved external symbol int __cdecl google::protobuf::compiler::PluginMain(int,char * * const,class google::protobuf::compiler::CodeGenerator const *) (?PluginMain@compiler@protobuf@google@@YAHHQAPADPBVCodeGenerator@123@@Z) referenced in function _main What version of the product are you using? On what operating system? 2.4.1 Please provide any additional information below. Just add LIBPROTOC_EXPORT to signature of PluginMain in src\google\protobuf\compiler\plugin.h -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Problem with C++ -writing multiple messages with a repeated field to a file
I'm having a problem writing multiple messages to a file and reading them back in c++ using GPB 2.3.0. What I'm trying to do: I have a GPB generated object that contains a repeated field, e.g. myobject.proto is: message MyObject { required uint64 x =1; required uint32 y =2; repeated uint32 z =3 [packed = true]; } I am taking the object, populating it with some random data and writing it to a file with the name filename. E.g. for method populateMyObject I have: void populateMyObject(const char * filename){ google::protobuf::uint64 x; google::protobuf::uint32 y; google::protobuf::uint32 z; //open file for writing int fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE); //create codedoutputstream FileOutputStream output(fd); CodedOutputStream codedOutput(output); //create 5 objects with dummy data for (int i = 0; i 5; i++) { boost::shared_ptrMyObject myObject = boost::shared_ptrMyObject(new MyObject()); x = i; y = (i + 1); myObject-set_x(x); myObject-set_y(y); //populate repeated field with 10 values for (ofs::UInt32 idx = 0; idx 10; idx++) { z = idx; myObject-add_z(z); } google::protobuf::uint32 myObjectSize = myObject-ByteSize(); //write size of this serialized object codedOutput.WriteVarint32(sparseImageSize); //serialize this object to file myObject-SerializeToCodedStream(codedOutput)) { } output.Flush(); output.Close(); close(fd); } However, when I run this method, I get the following error: libprotobuf FATAL google/protobuf/io/zero_copy_stream_impl_lite.cc: 346] CHECK failed: (buffer_used_) == (buffer_size_): BackUp() can only be called after Next(). Any ideas on what I'm doing wrong here? The problem is that the fatal error exits, so I can't continue to any other code, even though it appears (and I've read the file created successfully) that the file is created OK with multiple MyObjects being serialized. Should I be using some buffer of some kind? If any one can supply any sample code that does this successfully I'd be very grateful, thanks. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Problem with C++ -writing multiple messages with a repeated field to a file
On May 13, 2011, at 10:12 , Nigel Pickard wrote: libprotobuf FATAL google/protobuf/io/zero_copy_stream_impl_lite.cc: 346] CHECK failed: (buffer_used_) == (buffer_size_): BackUp() can only be called after Next(). Off the top of my head, I *believe* this is happening because the CodedOutputStream destructor is trying to reposition the FileOutputStream, but the FileOutputStream has already been closed. In this case, you either want to put the CodedOutputStream into its own enclosing scope, to force the destructor to run before you close the FileOutputStream, or just let the FileOutputStream destructor flush and close the file automatically. I hope this helps, Evan -- http://evanjones.ca/ -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 290 in protobuf: Cannot compile Google Protocol Buffers on z/OS
Comment #2 on issue 290 by ury.se...@gmail.com: Cannot compile Google Protocol Buffers on z/OS http://code.google.com/p/protobuf/issues/detail?id=290 Hi, I don't have a patch file -- and my sources are about 1 year old anyways -- I just added that #pragma to every C and H file. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.