jasonjack2015 / protobuf

Automatically exported from code.google.com/p/protobuf
Other
0 stars 0 forks source link

protoc can produce cpp code that fails to compile due to naming clash on generated classes #690

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download / build protobuf 2.6.1
2. cd to src dir, run protoc to generate cpp code for testcase.proto (./protoc 
--cpp_out=. testcase.proto)
3. compile with g++ (g++ -I. -c testcase.pb.cc)
4. see errors due to naming clash

What is the expected output? What do you see instead?
I'd expect protoc to fail with a sensible error rather than having GCC produce 
a large amount of relatively incomprehensible error messages.

What version of the product are you using? On what operating system?
Using protobuf-2.6.1 built on ubuntu 12.04 with gcc 4.6

Original issue reported on code.google.com by btkenn...@gmail.com on 21 Feb 2015 at 12:30

Attachments: