Hello, I’m having an issue : I’m using the z3 library with bindings for OCaml, however, whenever I compile a program, and I execute it I get :
dyld: Library not loaded: libz3.dylib Referenced from: /path/to/binary/./binary.exe Reason: image not found
That is due to z3 depending on dynamic libs…
However, the file
libz3.dylib is in
~/.opam/myswitch/z3/libz3.dylib . So I need to extend my
PATH depending on my operating system. And I want that to be done dynamically depending on the current switch/esy sandbox I’m using Is there a way of doing that properly with dune ?
Also, is it possible to point to the said dylib file so that it gets added to the
.install file ?
We’re building both a binary and a library, and because of z3, any binary built with our library will need the
dylib file… And if the binary is installed, it needs to be installed next to the dylib file. I wish there was a way to get rid of that file and integrate it in the ocaml z3 library directly…