I understand your explanation, and have changed my automake to;

        $(PROTOC) --cpp_out=$(top_srcdir) -I$(top_srcdir) $(PROTOC_FLAGS) $<

which seems to handle it.

However, there is still one point we're not connecting on, which is
this. It seems that when a.proto compiles, the name for
'protobuf_AddDesc_foo_2eproto'  is derived from the canonical name for
a.proto, but when b.proto compiles, the name of that function is
derived not from the canonical name for a.proto, but from the import
statement in b.proto - because protoc assumes the two will be the same
thing.

In a Java world, the assumption that these two things will be the same
holds because the javac enforces it with strict package name and
folder name checking relative to the CLASSPATH. protoc doesn't do
this, and so it shouldn't make the same assumptions.  When compiling
b.proto, it should use the canonical name for a.proto to cook the
method name.  If you search the -I paths, and find two a.proto files,
then by all means, flag an error and exit.

Peace.

-- 
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