Hi everyone,

i have a problem with import command.
I'm trying to build proto files dynamically. That mean I load every
file by using
FileDescriptorProto => FileInputStream => Tokenizer => Parser. After
that a get a FileDescriptorProto.
But to be able to use reflection i need build it by calling Build on
DescriptorPool to get a FileDescriptor.
Or put FileDescriptorProto instances into DescriptorDatabase (i use
SimpleDescriptorDatabase) and then initialize a DescriptorPool with
this database.
This technique works fine until i use import command.

So now comes my problem.
I'm loading two files "Common.proto" and "Specific.proto", Specific
file contain a call of import command
import "Common.proto".
I'm building specific file after common by using technique mentioned
above, but i get error that build is unable to find file specified in
import.
I tried to change path in import, put absolute path, tried to find a
method or way how to specify import path as (--I / --proto_path)
switch does in protoc.

My question is:
 1. is there some way how to set import folder dynamicly/from code ?
 2. or iste there some specific method order witch i have to call ?
 3. or path must by written in specific way
 4. how can i combine more files together to get an result with
working import command

error msg:
ErrorLocation=  9, file: ../../usr/Proto\specific.proto,
element: ../../usr/Proto\specific.proto, Import "common.proto" was not
found or had errors.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to