Two years after this question was asked, I still could not find a good solution. I had the same problem, and in the end it was fixed after some kind of detective work. The problem was this: I had the latest protobuf from git repo, https://github.com/google/protobuf . When I tried to create my project, it threw the error shown in qmp answer,
#if GOOGLE_PROTOBUF_VERSION < 2004000
I was creating code that someone else wrote, and they did not specify a version in their .proto file. The default value is syntax = "proto2"; I added syntax = "proto3"; into the .proto file immediately before the package declaration and deleted all instances of the optional and required keywords, since they are not part of version 3 syntax. Then I restored protobuf from the command line.
prompt@ubuntu $ protoc --cpp_out=. project.proto
This updated all files created by the duct to version 3, which solved the problem.
tn3rt source share