After days trying to compile successfully gRPC, I have this problem, following this tutorial (https://www.infopulse.com/blog/grpc-framework-by-google-tutorial/) when trying to compile the example code:
cannot open include file "google/protobuf/port_def.inc"
The weird thing is that the other included stuff seems to work, but this one is keeping giving problem even after trying different guides to install gRPC. Anyone can think of a solution to this?
I guess you're trying to compile protobuf files generated with a different version of profobuf than you have installed. It's safest to regenerate the implementations from the .proto-files yourself.
I.e.
protoc -I=$SRC_DIR --cpp_out=$DST_DIR $SRC_DIR/addressbook.proto
More here: https://developers.google.com/protocol-buffers/docs/cpptutorial
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With