How to import “goolge/protobuf/descriptor.proto” using proto_library?

354 views
Skip to first unread message

Peter Wang

unread,
Sep 12, 2021, 6:18:39 PM9/12/21
to bazel-discuss
when I follow guide for proto_library to convert .proto to c++ header files, I met some questions as follows:
``` bash
src/3rdparty/osi/osi_version.proto:5:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
src/3rdparty/osi/osi_version.proto:51:8: "google.protobuf.FileOptions" is not defined.
```
I have add proto_library in my bazel file, did I miss some deps options?

Daniel Wagner-Hall

unread,
Sep 12, 2021, 6:36:55 PM9/12/21
to Peter Wang, bazel-discuss
You probably want to add a dep to the proto_library target on a target which provides it; I think @com_google_protobuf//:descriptor proto may do the job.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/a62a3523-7546-43cf-8735-5d16f8612130n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages