Hi all,
I'm having trouble with a Bazel cc_binary target that depends on a cc_library. Specifically, I expected the headers of the cc_library to be automatically accessible to the cc_binary, but I find that I have to manually specify the include path in the cc_binary’s copts for it to work. Here’s a simplified example of my setup:
In this setup, I was expecting that the hello-world binary would have access to hello-greet.h (which is located in main/include) without needing copts in the cc_binary rule itself. However, without specifying copts = ["-Imain/include"] directly in hello-world, it doesn't seem to work.
My question is:
Any insights or best practices on how to handle this would be greatly appreciated!
Thank you!
PCReddy
I'm having trouble with a Bazel cc_binary target that depends on a cc_library. Specifically, I expected the headers of the cc_library to be automatically accessible to the cc_binary, but I find that I have to manually specify the include path in the cc_binary’s copts for it to work.
Any insights or best practices on how to handle this would be greatly appreciated!
--
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 visit https://groups.google.com/d/msgid/bazel-discuss/CAKaOXii3jQrfjkCuwSJGRhR_tfxHD8Sca9wrUfEeUp3L_59YaQ%40mail.gmail.com.
What will be my commission or reward if I work this out for you
I have the program in my store file but I'll charge you for that , I don't know if you can come up with $360
To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/CANw2gKOV%3D_E0YQpNxzA45tqmTyKqP5p02x34XX8uXjoOPE7KdA%40mail.gmail.com.