I have developed a set of libraries/common classes that I use in all my apps (this is on unix), and compiled them into a shared object (.so). Then, when I compile my individual apps, I link the library with the executable with -L /libs/ -l mylib . When running any app, I then make sure that the /libs directory is in my LD_LIBRARY_PATH
This works perfectly fine in most cases. The problem I'm facing is that I change these libraries often, and therefore for my existing applications stop working if they are not recompiled/re-linked against the new .so file.
Here's my question: (finally)
Is there a way that I can link in my library code (via compiler flags, etc.) such that the executable is 'stand-alone' meaning that all of the required code is there? This way, the apps can use the code that it was compiled with, without regard to if and when I change the library. I don't care if the executable size grows or anything like that - I've got the disk space.