Nitish Joshi | 30 Mar 16:10 2015
Picon

Delete Repeated field entry

How to delete Repeated field element?

--
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.
Peter Pimley | 27 Mar 13:32 2015
Picon

GoogleOnceInit template arguments differ with GOOGLE_PROTOBUF_NO_THREAD_SAFETY

I'm trying to get Protobuf 2.6.0 to compile on an embedded system that uses a customized version of clang as its compiler.  The compiler is giving me an error, and after looking at it for a while I think agree with the compiler.  After a quick glance it appears that Protobuf 2.6.1 is the same, but I haven't tried it yet.

The error is in once.h, with GOOGLE_PROTOBUF_NO_THREAD_SAFETY defined.

The exact error is:

In file included from [snip]\protobuf-2.6.0\src\google\protobuf\descriptor.cc:45:
1>  In file included from ../src\google/protobuf/descriptor.pb.h:22:
1>  In file included from ../src\google/protobuf/generated_message_util.h:44:
1>../src\google/protobuf/stubs/once.h(152,4): error : no matching function for call to 'GoogleOnceInit'
1>  [snip]\protobuf-2.6.0\src\google\protobuf\descriptor.cc(889,26) :  note: in instantiation of function template specialization 'google::protobuf::GoogleOnceDynamic::Init<std::pair<const google::protobuf::FileDescriptorTables *, const google::protobuf::SourceCodeInfo *> >' requested here
1>  ../src\google/protobuf/stubs/once.h(101,12) :  note: candidate function [with Arg = std::pair<const google::protobuf::FileDescriptorTables *, const google::protobuf::SourceCodeInfo *>] not viable: no known conversion from 'void (*)(std::pair<const google::protobuf::FileDescriptorTables *, const google::protobuf::SourceCodeInfo *> *)' to 'void (*)(std::pair<const google::protobuf::FileDescriptorTables *, const google::protobuf::SourceCodeInfo *>)' for 2nd argument


At the bottom of the file we can see the function GoogleOnceDynamic::Init.  The function takes two parameters: func_with_arg, a function that takes a T*, and secondly arg, which is a T* .  In the case of the error above, T is a std::pair of pointers.  GoogleOnceDynamic::Init passes func_with_arg and arg to the function GoogleOnceInit<T>.  However, GoogleOnceInit is declared as taking a function taking an actual T (not a T*), and an actual T (again, not a T*).

In the case where GOOGLE_PROTOBUF_NO_THREAD_SAFETY is *not* defined, GoogleOnceInit takes a function taking a T*, and a T*.

Should the GOOGLE_PROTOBUF_NO_THREAD_SAFETY version of GoogleOnceInit be altered to take T*?

Thanks,
Peter Pimley

--
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.
Jay Yang | 26 Mar 08:49 2015
Picon

Can the protoc generate header files without inline functions?

The reason why I ask is because we found the inline function take a lot of place in the header file. If I involve the header file in my pre-compiled header it may heavily, heavily, heavily slow down the project building. So I'm just thinking if it could isolate the inline functions into the cpp files then the header files would be less lines.
So is there any way to make the protoc to generate only declaration in the header files and put the implementation into the cpp files?

--
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.
Asha Raghotham Maralli | 25 Mar 10:45 2015
Picon

Running the example program Addressbook

Hi 

I am new to protocol buffers. I was trying to execute the example program given under https://developers.google.com/protocol-buffers/docs/javatutorial . When i give 

protoc -I=protobuf-2.6.1\examples --java_out=protobuf-2.6.1 protobuf-2.6.1\examples\addressbook.proto

There is an error which says , --proto_path passed empty directory name. < Use " . " for current directory. >

This does not generate com/example/tutorial/AddressBookProtos.java in the specified destination directory. 

Please help

--
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.
Deepak Patel | 24 Mar 20:40 2015
Picon

How to use protoc.exe in Windows for eclipse luna?

I am using Eclipse IDE, Version: Luna Release (4.4.0) to build a project. I am trying to use google protocol buffers. But I don't know how to use protoc to compile .proto files and then how to use the source code to build my project. I have downloaded compiler and source code fromhttps://developers.google.com/protocol-buffers/docs/downloads

But how to integrate it with Eclipse IDE, I have no clue. As I am a beginner in protobuf, it will be a great help to me if someone could explain it step by step that how to use the protoc compiler and source code in eclipse.

Thanks in advance.

--
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.
Deepak Patel | 24 Mar 20:21 2015
Picon

How to use protoc.exe in Windows for eclipse luna?

I am using (Windows 7) Eclipse IDE, Version: Luna Release (4.4.0) to build a project. I am trying to use google protocol buffers. But I don't know how to use protoc to compile .proto files and then how to use the source code to build my project. I have downloaded compiler and source code fromhttps://developers.google.com/protocol-buffers/docs/downloads

But how to integrate it with Eclipse IDE, I have no clue. As I am a beginner in protobuf, it will be a great help to me if someone could explain it step by step that how to use the protoc compiler and source code in eclipse.

Thank in advance.

--
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.
Mike Heffner | 24 Mar 19:09 2015

ProtoBuf v2/v3 wire compatibility

Hi,

I haven't been able to find any documentation that explicitly states whether the wire (binary) format of Protobuf v2 messages are compatible with protobuf messages generated with v3 (using `syntax=proto2`). The only documentation seems to mention API differences between the two library versions.

We use protobuf-java and would like to transition from PB v2->v3, but only for new message types. We would like systems that use protobuf-java v2 and protoc v2 generated messages to be able to communicate with systems using protobuf-java v3 and protoc v3 generated messages (and vice versa). It stands to reason that messages that use `syntax=proto3` are not guaranteed to work in this fashion, but I'm curious about messages marked as proto2.


Thanks,

Mike




--
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.
Orel Walker | 20 Mar 20:04 2015
Picon

New to protobuf learning to write and read messages

Hello All!!!,
 I am new to protobuf and I was following the tutorial and got to the point where it creates the class based on my .proto file. I am just not sure now how to run the class or if the class is even runnable... Would anyone be able to point me in the direction on how to get messages sent or read from binary using protobuf. eg : I have this binary file

 0a04 4f72 656c 1206 5761 6c6b 6572 1900
0000 0000 24fe 40 <--- this is coming from a c# protobuf compiler and I want to translate it in my java protobuf compiler if this is possible.
Not sure if i should read the file directly and call a class/method or if it is supposed to feed into it from the cmd like with the protoc.exe file.
Any help will be appreciated, thank you in advance!!!
Regards,
-Orel


--
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 | 18 Mar 22:49 2015

Issue 694 in protobuf: module machine type 'x64' conflicts with target machine type 'X86'

Status: New
Owner: liujisi <at> google.com
Labels: Type-Defect Priority-Medium

New issue 694 by va... <at> pushstrength.com: module machine type 'x64'  
conflicts with target machine type 'X86'
https://code.google.com/p/protobuf/issues/detail?id=694

What steps will reproduce the problem?
1. Create a project on x64 platform that exploits gtest
2. Compile
3. Error shows up

What is the expected output? What do you see instead?
module machine type 'x64' conflicts with target machine type 'X86'

What version of the product are you using? On what operating system?

Please provide any additional information below.

I have a project on Win32 platform. I followed all the steps on VS 2013 to  
move it to x64 platform as follows:

Build -> Configuration Manager -> Active Solution Platform -> <New> -> Copy  
from Win32
Build -> Configuration Manager -> Platform -> x64 (for all the projects)
Project -> Properties -> Configuration Properties -> VC++ Directories ->  
Library Directories ->  
$(VCInstallDir)\bin\x86_amd64;$(VCInstallDir)\bin.;$(WindowsSdkDir)lib\x64
Build -> Build Solution
If I don't select x64 for my unit tests, the solution builds like a charm!  
The problem is when I select to have the unit tests in x64 format as well.  
The problem should be from the google protobuf side but I don't know how to  
resolve it.

Does anyone have any clue?
Thanks

-- 
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.

Sayan Goswami | 18 Mar 03:15 2015
Picon

Using CodedOutputStream to send many messages across network

Hi All,

I am using CodedOutputStream and CodedInputStream to transfer messages across a network like so:

Client requests:

Socket serverSocket = new Socket(hosts, ports);

CodedOutputStream outputStream = CodedOutputStream.newInstance(serverSocket.getOutputStream());

outputStream.flush();

CodedInputStream inputStream = CodedInputStream.newInstance(serverSocket.getInputStream());


// the following happens inside a loop

     Request request = Request.newBuilder()

.setType(Request.RequestType.GET)

.setKey(key)

.build();


     outputStream.writeRawVarint32(request.getSerializedSize());

     request.writeTo(outputStream);

     outputStream.flush();


Server Processes Request:


CodedOutputStream output = CodedOutputStream.newInstance(clientSocket.getOutputStream());

output.flush();

CodedInputStream input = CodedInputStream.newInstance(clientSocket.getInputStream());


int length = input.readRawVarint32();

byte[] message = input.readRawBytes(length);

Request request = Request.parseFrom(message);

// do things with request


Now, each request of mine, has a serialized size of 56.. so I can send many messages up the stream, but what can I do when the size limit of 64MB is exceeded? Is there any way to reset the buffer? Following is the error message I am getting:


Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.
Thanks,

Sayan

--
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.
jagadish R | 17 Mar 07:51 2015
Picon

libprotobuf-lite size can be reduced less than 2.3 MB?

Hi,

    I have to use Google protocol buffer(GPB) for serialization/deserialization in my embedded project, since I have very limited RAM and Flash, is there any way I can optimize the libprotobuf-lite and reduce the memory footprint? Also I dont want to use protobuf-c /nanopb.

Please let me know on this,

Thanks & Regards
Jagadish

--
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