0

This question is primarily about using bazel to develop a C++ application that uses a 3rd party package of headers and built libraries, with the headers accessible as system includes, i.e. using angle brackets to specify the headers: #include <header.h>

I expect this is a common use case but after an hour of searching documentation, I still don't see an obvious approach to try.

My particular use case is to use tensorflow 1.4 built from sources. Tensorflow was installed at this location on my system:

~/.pyenv/versions/3.6.3/envs/tensorflow14py36/lib/python3.6/site-packages/tensorflow

How do I modify my bazel BUILD and/or WORKSPACE so that I can compile (and eventually link) my application that includes tensorflow headers such as:

#include <tensorflow/core/public/session.h>

4dan
  • 1,033
  • 10
  • 14
  • 1
    I've found a related question: https://stackoverflow.com/questions/33620794/how-to-build-and-use-google-tensorflow-c-api It appears the recommended solution is to simply copy the headers and libraries to /usr/local/. I'd prefer a differently solution but for now I am going to try that approach. – 4dan Dec 02 '17 at 21:59
  • 1
    Could you please promote this comment to an answer, so the question doesn't show up as "unanswered"? – László Dec 04 '17 at 10:20

1 Answers1

0

I've found a related question: How to build and use Google Tensorflow It appears the recommended solution closest to my expectations is to simply copy the headers and libraries to /usr/local/. I'd prefer a different solution, but for now, I am successfully using that approach.

I've also filed an issue with the Tensorflow team: https://github.com/tensorflow/tensorflow/issues/15290

4dan
  • 1,033
  • 10
  • 14