The article is correct
Posted Apr 1, 2012 10:14 UTC (Sun) by
khim (subscriber, #9252)
In reply to:
The article is correct by danieldk
Parent article:
Free is too expensive (Economist)
Another possibility would be to statically link the application, but that has its own problems (e.g. no dlopen()).
You can link some libraries statically and the rest dynamically. GlibC, in particular, is remarkably stable and it's easy to support older distributions with older versions of GlibC via LSB.
Something like -Wl,-Bstatic -lunstablelib1 -lunstablelib2 -Wl,-Bdynamic should do the trick.
Of course dlopen creates complications: if you want to use some library both from plugin and from main application (or just from two plugins) then you'll end up with two copies of library in memory! This, too, is solvable (for example you can add appropriate library to the main executable and use --export-dynamic to make it available for plugins), but yes, it's a PITA.
Yet you solve this somehow for MacOS and Windows (last time I've checked Windows had no DB XML support) thus it should be solvable for Linux, too.
The biggest problem with Linux is Q&A: if you limit yourself to LSB then you can not do a lot of things which are expected from modern program and if you use libraries outside of LSB then you immediately lose then cross-distribution compatibility and need to test your application with different versions of different distributions.
(
Log in to post comments)