Hello, 

I am using the released java package of protobuf-3.0.0-beta-1 
(*protobuf-java-3.0.0-beta-1.zip 
<https://github.com/google/protobuf/releases/download/v3.0.0-beta-1/protobuf-java-3.0.0-beta-1.zip>),
 *

I have problem of having protoc to import and recognize a type: 

I have two proto files ("gubmessage.proto","messageheaders.proto") in the 
source directory (see below)

<https://lh3.googleusercontent.com/-gJDR8JSrLi0/VnjQvo7ajlI/AAAAAAAAAFc/rnS5vN5mI4I/s1600/sourcedirectory.png>

the "gubmessage.proto" import the"messageheaders.proto"; and also import 
the "any.proto" under protobuf-3.0.0-beta-1/src/google/protobuf (see below) 
----------------------------------------
syntax = "proto3";

import "messageheaders.proto";
import "google/protobuf/any.proto";

package gubmessage;

option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_package = "com.gubnoi.protocol";
option java_outer_classname = "GubMessage";

message GMessage{
  Headers headers = 1;  
  Any body  = 2 ;   
}
-------------------------------------------
 the messageheaders.proto 
------------------------------------------
syntax = "proto3";

package messageheaders;
option java_package = "com.gubnoi.protocol";
option java_outer_classname = "MessageHeaders";

message Headers{
 
        bool censured = 1;
        string header = 2;
repeated string tag = 3 ;
}
-------------------------------------

then I run the command " protoc --proto_path=$FR 
--proto_path=./google/protobuf --java_out=$TO $FR/gubmessage.proto", 

the environment FR refers to the source directory, and the TO refers to the 
destination directory

the protoc replied that the imported types "Headers" and "Any" are not 
defined. in the mean time, there are also two warnings say that the imports 
are not used (see below) 

<https://lh3.googleusercontent.com/-UNoa5FGabIo/VnjVPQAIAXI/AAAAAAAAAFo/VWh822M9kSM/s1600/protocresults.png>


any advice?

thanks 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to