Sample Header Ad - 728x90

Find a shared library that isn't in its stated location

1 vote
2 answers
1082 views
I am writing c++ code, and using cmake to compile the application. I want to add the dylib (libraries) to the Frameworks folder. Macdeployqt does not find them all. I have written my own python script to try and find most, but a few still elude me. Here is a short list of what I still can't find: Dependency Not Found! /usr/lib/libz.1.dylib Dependency Not Found! /usr/lib/libiconv.2.dylib Dependency Not Found! /usr/lib/libbz2.1.0.dylib Dependency Not Found! /usr/lib/libexpat.1.dylib Dependency Not Found! /usr/lib/libresolv.9.dylib Dependency Not Found! /usr/lib/libxml2.2.dylib Dependency Not Found! /usr/lib/libsasl2.2.dylib I usually use brew to install (which I assume is in /usr/local/Cellar by brew --prefix and Cellar), I have so far recursively searched: /usr/local/opt/**/{lib_name} /usr/local/Cellar/**/{lib_name} Where the "**" can be any set of folders and names. Where else can I look, it is not in /usr/local/lib where it states it should be. Even a symlink would be useful. I need to find these files, how can I do that, even manually would be okay, but i'd prefer some script? Somehow the application can find these on my own computer when run, but otool lists me places (/usr/local/lib) where it cannot be found!
Asked by msj121 (163 rep)
Apr 20, 2023, 04:33 PM
Last activity: Apr 20, 2023, 10:20 PM