Status: New
Labels: Type-Defect Priority-Medium

New issue 163 by tianhaozhang: protoc cpp invalid #include links

What steps will reproduce the problem?
1. Create "TestRoot" message to import"TestLeaf" in ./src/TestRoot.proto
2. Create "TestLeaf" message in ./src/Foo/TestLeaf.protoc
3. Run "protoc --cpp_out=../Test TestRoot.proto ./Test/Foo/TestLeaf.proto
4. Open the generated file "../Test/Foo/"

What is the expected output? What do you see instead?
I am expecting the #include statement to read:
    #include "TestLeaf.pb.h"

However it reads
    #include "Foo/TestLeaf.pb.h"

What version of the product are you using? On what operating system?
Using 2.3.0, Windows XP + Visual Studio 2008 SP1.

Please provide any additional information below.

When compiling the VS complains that it could not open include file
"Foo/TestLeaf.pb.h". If I manually change the #include statement to read:

    #include "TestLeaf.pb.h"

The project compiles fine.

Please let me know if I can helpout by providing any additional information,


You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to