Closed ttdonovan closed 6 years ago
We recently had to change how the proto files include each other to fix an issue with python.
Since the proto file is trying to include the other one as "s2clientprotocol/common.proto", the include search path has to point to the folder that contains the s2clientprotocol folder.
So, try using this as your include path option: -I s2client-proto/
I am also not sure what your proto_path option does. We don't use that in our command line options.
@KevinCalderone thank you that worked I guess I mis-understood how the include path worked.
protoc -I s2client-proto --rust_out src/protos s2client-proto/s2clientprotocol/*.proto
Maybe it might be worthwhile to include instructions or an example of how to generate the protobuf code manually with protoc
.
Cool I will close this then.
If you run the cmake of our s2client-api repo, it generates a "sc2protocol" project that has the protoc command line we use.
The CMake can be found here: https://github.com/KevinCalderone/s2client-api/blob/master/src/CMakeLists.txt
Example command line it generates:
..\bin\protoc -I=D:/Git5/s2client-api/src/../protocol/ --cpp_out=D:/Git5/s2client-api/build/generated D:/Git5/s2client-api/src/../protocol/s2clientprotocol/common.proto
I'm trying to generate the protos from a git submodule in my project - running the following command errors out.
I've also tried created a symbolic link and executing this command but get a lot of "file not found" and "is not defined".
Any advise would greatly be appreciated.