Apparently a problem of boundling dynamic libraries in OSX is an [in]famous one. While creating a binary with LispWorks DV for OSX I've found that my app uses osicat, which generates the libosicat.dylib, so I had to bundle it together with the app.
LW solution seems to be trivial for that - I've just embed the library into LW binary, instead of copying the file.
To do that, in a in a delivery step I do
```
(push :myapp-delivery *features*)
(ql:quickload :myapp)
;; Special handling for osicat. We need to find libosicat.dylib cffi-wrapper library and embed it into the image
(defun find-osicat-dylib ()
;; "/Users/fourier/.cache/common-lisp/lw-8.0.1-macosx-x64/Users/fourier/.quicklisp/dists/quicklisp/software/osicat-20231021-git/posix/libosicat.dylib"))
(let ((osicat-dylib
(directory (merge-pathnames "**/libosicat.dylib" asdf:*user-cache*))))
(assert osicat-dylib)
(car osicat-dylib)))
(fli:setup-embedded-module :libosicat
#.(fli:get-embedded-module-data
(find-osicat-dylib)))
(fli:install-embedded-module :libosicat)
```
This allows the LW to embed the libosicat.dylib into the binary.
In main app function I would just need to load it explicitely from the embedded module:
```
#+:myapp-delivery (fli:install-embedded-module :libosicat)
```
Now delivered app works fine even without libosicat.dylib present on a target computer.
#lispworks