I have built a binary 'foo'. I now want the executable to be a linked to a dynamic library 'bar'. How can I link foo to bar?(using ld
or any other way). I don't want to use DYLIB_INSERT_PATH
on OSX or its equivalent LD_PREOAD
on Linux.
I want to do this on OSX, but this question is a generic one.