I would like to distribute my application. However, it is full of dylibs all from different locations. I would like to just copy them to the Resources/lib directory and set my LD_LIBRARY_PATH to point to it with a startup shell script, just like I do in Linux after I clear the rpath with chrpath. Currently, I am struggling with otool / install_name_tool and I don't seem to be able to change the 'name' property of the dylib.
Asked
Active
Viewed 150 times
0
-
Why not leave them in Resources where they will be found automatically at load time? – matt May 29 '20 at 13:48
-
Sorry. I am not familiar with MacOS. You mean that if I leave them in Contents/Resources (or is it Contents/Resources/lib?) they will be found automatically, regardless of install name or rpath? – user2517097 May 30 '20 at 15:23
-
Did you try searching? I found this immediately: https://stackoverflow.com/questions/4677044/how-to-use-dylib-in-mac-os-x-c – matt May 30 '20 at 15:32