I have an older version of glib that all applications are compiled against and use. I need to install a new application that requires a newer version of glib to compile and run. I installed the new version of glib in a separate folder (without uninstalling the older version) and am able to compile the new application (using pkg-config
). The compilation script uses a linker flag like -lglib-2.0
to link against the library.
However, I am not sure of the best way to have the two libraries together so that they can be used by their applications that need them. Setting LD_LIBRARY_PATH
to point to the location of the new library breaks the old applications.
I could set LD_LIBRARY_PATH
everytime the new application runs to point to the new glib path (through an sh
script for example), but I am wondering if there's a better way.