Hi, I have a unix executable that requires two libraries, which are currently dynamically linked. Now I would like to distribute the binary together with the libraries. I failed to compile static libraries (and I also see the disadvantage of upgrading) so I am wondering what the best way is ti package the unix executable with the libraries.
Right now, I have created a .app bundle with the unix executable in 'my.app/Contents/MacOS' and the dynamic libraries in 'my.app/Contents/Frameworks'. After creating the bundle I have changed the lib location in the binary using install_name_tool to @executable_path/../Frameworks/libmylib.dylib.
When I start the app file it crashes right away. I can, however, directly address the binary using 'my.app/Contents/MacOS/my', which works.
How bad is this practice? What would be a better alternative to package the binary with the dynamic libraries? Actually, I do not need the user to start the app. I am calling the binary from another application so that it's not strictly necessary that the user starts the app. But I really have the impression that's bad practice. So I would like to either package in a different way or make the .app file work.
Thanks!
Right now, I have created a .app bundle with the unix executable in 'my.app/Contents/MacOS' and the dynamic libraries in 'my.app/Contents/Frameworks'. After creating the bundle I have changed the lib location in the binary using install_name_tool to @executable_path/../Frameworks/libmylib.dylib.
When I start the app file it crashes right away. I can, however, directly address the binary using 'my.app/Contents/MacOS/my', which works.
How bad is this practice? What would be a better alternative to package the binary with the dynamic libraries? Actually, I do not need the user to start the app. I am calling the binary from another application so that it's not strictly necessary that the user starts the app. But I really have the impression that's bad practice. So I would like to either package in a different way or make the .app file work.
Thanks!