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!
find / -name dylib
to search every directory from the root on. To limit to/usr/local
just add that to the commandfind /usr/local …
find
attempts to search everything including directories you don’t have permissions for. If you have no access to those directories, it’s a good bet your library won’t be there.