You need to invoke the grpc plugin.  The default protoc tool does not 
generate gRPC stubs on it's own.  Here's what it looks like:

$ protoc --cpp_out=outdir \

  --plugin=protoc-gen-grpc=path/to/the/grpc-cpp-plugin \

  --grpc_out=outdir \


# Generated by protoc


# Generated by grpc plugin


I've written a tool for bazel that can do this for you and provide all the 
required build environment, if you're interested in trying it out.


On Friday, August 5, 2016 at 9:03:47 AM UTC-6, Mohamed Koubaa wrote:
> Hello,
> As per the language guide, defining a service in a .proto file will 
> generate RPC stubs which we can implement (or let gRPC implement). 
> We have a zeroMQ service that we are interested in migrating from JSON-RPC 
> to gRPC.  To stage this effort, we are interesting in creating the RPC 
> stubs and using the same zeroMQ to implement them, and then move to gRPC 
> once we deal with an orthogonal service discovery problem that prevents us 
> from dropping zeroMQ immediately.
> To my surprise, adding the RPC code to the .proto did not generate any 
> stubs in c++. I am using proto3 beta4 at the moment.  Do I need any 
> additional flags to protoc?
> Thanks
> Mohamed Koubaa
> Software Developer

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

Reply via email to