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
Job.proto:11:18: "DescriptorProto" is not defined.
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
  2 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
 
Fahad Madani  
View profile  
 More options Sep 28 2012, 5:19 am
From: Fahad Madani <fsmad...@gmail.com>
Date: Fri, 28 Sep 2012 02:19:47 -0700 (PDT)
Local: Fri, Sep 28 2012 5:19 am
Subject: Job.proto:11:18: "DescriptorProto" is not defined.

Hi,

I am trying to compile my .proto file using protoc compiler and generate
java classes for the same.
Below is my Job.proto file

*import "google/protobuf/descriptor.proto";

option java_package = "com.myfile.test";
option java_outer_classname = "JobProto";

message Job{
    required string companyName = 1;
    required string designation = 2;
    required int32 salary = 3;
    required DescriptorProto file_prot = 4;

}*

And my protoc command is

*protoc %Input%\Job.proto --java_out=%Output% --descriptor_set_out=job.desc
--proto_path=%Input% --proto_path=%protobuf_src_folder%*

where environment variable definition are:
Input: Folder in which Job.proto file is present
Output: Foldedr where my output classes are generated
protobuf_src_folder: Path till "..\protobuf-2.4.1\src"

when i execute the above command i get
*Job.proto:11:18: "DescriptorProto" is not defined.*

I have tried copying the discriptor.proto in the same folder and modifying
the import statement (still i get the same error). Whatever i have browse i
just found setting --proto_path properly but in my case the path is proper
but still i am getting the same error. I have also ensure that my protobuf
source version and protoc version are same "2.4.1"

Can anyone tell me whats wrong ?


 
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.
Jason Hsueh  
View profile  
 More options Oct 2 2012, 2:46 am
From: Jason Hsueh <jas...@google.com>
Date: Mon, 1 Oct 2012 23:45:57 -0700
Local: Tues, Oct 2 2012 2:45 am
Subject: Re: [protobuf] Job.proto:11:18: "DescriptorProto" is not defined.
To start with you need to use the qualify with the package as
google.protobuf.DescriptorProto. See the section on Name Resolution:
https://developers.google.com/protocol-buffers/docs/proto#packages

Assuming your paths are set up correctly it should work after that.


 
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 »