You technically don't need to qualify StringMap with foobar at all, since
both .proto files are in the same package.
http://code.google.com/apis/protocolbuffers/docs/proto.html#packages

On Mon, Sep 13, 2010 at 8:00 AM, jebrick <jebr...@gmail.com> wrote:

> The problem turned out to be how I was referencing the 1st file from
> the 2nd rather than the compile command.
>
> file 1 is foo.proto  and it package is foobar
>
> file 2 is bar.proto which is in the same package and imports foo.proto
>
> when referencing a member of foo.proto for use in bar.proto I had
> foo.StringMap.
>
> What I needed was forbar.StringMap.
>
> The protos were made and compiled first for .Net which seem to work
> with the file reference.member
> The Java compiler wanted package.member.
>
> thanks for the help.
>
> On Sep 10, 12:30 pm, Jason Hsueh <jas...@google.com> wrote:
> > Yes, imports are paths, so use import "com/foo/bar/some.proto"; The paths
> > need to be specified relative to the --proto_path, not the location of
> the
> > file with the import statement.
> >
> > On Fri, Sep 10, 2010 at 6:40 AM, users .... <moofis...@gmail.com> wrote:
> > > Have you tried putting the import path in quotes?
> >
> > > import "foo.proto"
> >
> > > Second ... The import function needs a path, not the dot notation.
> >
> > > import "com/foo/bar/some.proto" might work?
> >
> > > On Sep 9, 9:26 am, jebrick <jebr...@gmail.com> wrote:
> > > > I want to import 2 files to my proto for compiling.
> >
> > > > The package for all of the files are the same.  They are all in the
> > > > same place (src/com/foo/bar)
> >
> > > > When  I write the import statement, is it import
> > > > com.foo.bar.some.proto?
> >
> > > > My compile command looks like this:
> > > > protoc proto_path=src --java_out=java src/com/foo/bar/some.proto
> >
> > > > The errors are simple, it can not find any of the imports and thus
> can
> > > > not find any thing that references the other files.
> >
> > > > What is the correct set up for doing the imports?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Protocol Buffers" group.
> > > To post to this group, send email to proto...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
> <protobuf%2bunsubscr...@googlegroups.com<protobuf%252bunsubscr...@googlegroups.com>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/protobuf?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

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

Reply via email to