Redhat 5.5
gcc version 4.1.2
I have a directory call lib, and in that directory I have all the shared libraries (about 30) that we get from our customer as we use their API. We link with this API.
directory structure:
/usr/CSAPI/lib
However, our customer will update their API so we get new libraries, normally about 3 or 4.
What I have been doing is when I get new libraries. Is to remove the old one and put in another directory. And replace them with the new libaries in the lib directory.
/usr/CSAPI/Old_libs
The new and old will have the same name. i.e.
libcs.so < old
libcs.so < new
Is there a better way to manage this? I was thinking of creating a soft line, but as the names are the same, I am not sure that this will work.
Many thanks,
Symlinks are a very good way to handle this. I would do something slightly differently. I would create a directory structure like:
and in each of these I would put the actual files. I would then create a separate directory:
which only contains symlinks to the actual files in
lib_v1,lib_v2, etc.This way
libhas the most current version, but if you need, you can use a previous version by simply changing your LD_LIBRARY_PATH.