0

I have this project that uses TensorFlow and OpenCV. I installed TF as described here and OpenCV as described here.

I have two pairs of .cc and .h files that I build using cc_library in the BUILD file. It compiles and works perfectly. In the bazel_bin folder, I noticed that bazel compiled the .a files. I would like to move these files to be elsewhere. However, when I move the folder that held both the binary and the .a files elsewhere I get this error:

error while loading shared libraries: libopencv_calib3d.so.3.1: cannot open shared object file: No such file or directory

How can I fix this?

EDIT1: I am attaching my BUILD file just in case.

EDIT2: So I tried to simply move the .a files to another folder, and link it up (using the method described here) in the makefile which gives me this error:

../src/conversion.h:11:44: fatal error: tensorflow/core/public/session.h: No such file or directory compilation terminated.

Before I thought that my only problem was with OpenCV.

Seanny123
  • 8,776
  • 13
  • 68
  • 124
Alperen AYDIN
  • 547
  • 1
  • 6
  • 17
  • What is the final binary you are trying to build? Why do you need to copy the bazel built library elsewhere? Can you simply add a rule for the final binary in the `BUILD` file and build it with bazel? – keveman Aug 25 '16 at 20:15
  • I am trying to move the .a files as they are needed in another project. That project is already using Makefile and it is a bit late to change it. I was kinda hoping that having a static library could have helped solve a lot of problems. – Alperen AYDIN Aug 25 '16 at 20:21

0 Answers0