Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue 420 in protobuf: code generation problem when using namespaces and import from a root directory
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
proto...@googlecode.com  
View profile  
 More options Sep 19 2012, 9:41 am
From: proto...@googlecode.com
Date: Wed, 19 Sep 2012 13:41:14 +0000
Local: Wed, Sep 19 2012 9:41 am
Subject: Issue 420 in protobuf: code generation problem when using namespaces and import from a root directory
Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 420 by pierre.g...@free.fr: code generation problem when using  
namespaces and import from a root directory
http://code.google.com/p/protobuf/issues/detail?id=420

What steps will reproduce the problem?
1. create directory ns1 and subdirectory ns2 (ex <project_path>\ns1\ns2)
2. create a first proto file with a message within package ns1.ns2; (ex  
person.proto)
3. create a second proto file in the same package ns1.ns2; and add  
import "ns1/ns2/First.proto"; + a message using the message declared in  
step 2. (ex addressbook.proto)
4. for each proto file generate code using the command: protoc  
-I="<project_path>" -I=. --cpp_out=. <file_name>.proto

What is the expected output? What do you see instead?
Generated code should compile but instead there is a problem with names of  
few generated functions used in generated outer classes.
Ex:
In file addressbook.pb.cc, function void  
protobuf_AddDesc_addressbook_2eproto() calls  
function ::ns1::ns2::protobuf_AddDesc_ns1_2fns2_2fPerson_2eproto() instead  
of ::ns1::ns2::protobuf_AddDesc_Person_2eproto() declared in person.pb.h

What version of the product are you using? On what operating system?
protoc --version --> libprotoc 2.4.1
Tested on Windows XP and Windows Seven

Please provide any additional information below.
Full example available in attachment

Attachments:
        ns1.zip  11.4 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Dec 3 2012, 6:20 pm
From: proto...@googlecode.com
Date: Mon, 03 Dec 2012 23:20:37 +0000
Local: Mon, Dec 3 2012 6:20 pm
Subject: Re: Issue 420 in protobuf: code generation problem when using namespaces and import from a root directory
Updates:
        Status: WorkingAsIntended

Comment #1 on issue 420 by xiaof...@google.com: code generation problem  
when using namespaces and import from a root directory
http://code.google.com/p/protobuf/issues/detail?id=420

You should be able to compile your code with the following command (after  
rename "Person.proto" to "person.proto"):
~$ protoc --cpp_out=. -I. ns1/ns2/addressbook.proto ns1/ns2/person.proto


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Dec 7 2012, 8:00 am
From: proto...@googlecode.com
Date: Fri, 07 Dec 2012 13:00:45 +0000
Local: Fri, Dec 7 2012 8:00 am
Subject: Re: Issue 420 in protobuf: code generation problem when using namespaces and import from a root directory

Comment #2 on issue 420 by techedud...@gmail.com: code generation problem  
when using namespaces and import from a root directory
http://code.google.com/p/protobuf/issues/detail?id=420

This example generates broken code as reported.  Please take another look


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Dec 7 2012, 2:06 pm
From: proto...@googlecode.com
Date: Fri, 07 Dec 2012 19:06:40 +0000
Local: Fri, Dec 7 2012 2:06 pm
Subject: Re: Issue 420 in protobuf: code generation problem when using namespaces and import from a root directory

Comment #3 on issue 420 by xiaof...@google.com: code generation problem  
when using namespaces and import from a root directory
http://code.google.com/p/protobuf/issues/detail?id=420

Please use the command line I gave in comment #1 to compile the proto file.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »