Here is the situation. I have several projects that are using the current version of a lbrary. I want these to NOT BE BROKEN” while I re-write the library for a new project. Sooner or later all projects will be updated to use the new version of the library. However, in the meantime, I want my new project to link to the newer version of the library, not the older one.
The obvious solution is to give the library a new name and/or put it into an entirely new fork, which however makes a mess of my preferred file heirarchy. It would be much nicer if I could simply specify the library version to link to with the -l option. Currently, I use the VERSION= option in the project file to set the library version, which works quite well. The problem is that qmake always links library.so to the most recent version (such as library.so.1.1.0). The older versions (such as library.so.1.0.0) are still there, but are now unlinked.
Now, the problem becomes a headache when I need to fix one of the other programs and the linker fails because it it linking to the wrong (that is new) version of the library. If I am left with putting the different versions into their own folders so that I can direct the linker to these unique folders, then so be it. I just thought it would be nice to be able to select a version using the -l option. It think that I remember being able to do this but cannot find any reference to the method I would use.
↧