[fpc-devel] FPC dynamic libraries

Michael Van Canneyt michael at freepascal.org
Wed Feb 7 23:45:31 CET 2007

On Thu, 8 Feb 2007, George Birbilis wrote:

> > > > We need a version system.
> > > 
> > > That's not something "we" need, but which most OS'es need 
> > (and don't 
> > > provide, except for hacks like symlinks or different filenames).
> > > Moreover, it doesn't really solve much unless you like having 20 
> > > different versions of the same shared library on your system (which 
> > > would more or less defeat the purpose of saving space, although it 
> > > could still save memory if more than one FPC program is 
> > running at the 
> > > same time).
> > 
> > If I understand well what you mean, Vista has versioning of 
> > that kind, you can ask to see older versions of any file and 
> > restore the one you want. A small caveat is that for files 
> > that don't exist currently anymore (deleted) there's no GUI 
> > to get them (or one I haven't spotted yet) and you need to 
> > make a dummy file with same name, then right click it and go 
> > to Properties, then ask for the older versions (there's a 
> > special tab for that on the dialog). Not sure if the Basic 
> > version of Vista has this functionality available (I tried it 
> > with Vista Ultimate)
> If you meant having many libs of different version exist side-by-side, .NET
> runtime supports it, but Win32 itself doesn't

Most unixes also have it. The point is that it kind of defeats the purpose.
Having 20+ libraries called fpcrtl-xyz.dll (or fpcrtl.so.x.y.z on unixes)
defeats the purpose of a shared library: saving disk and (more importantly)
memory space by factoring out common code. 

If we'd know that the fpcrtl.so (or .dll) interface will stay the same in the 
next 5 years, it makes sense to distribute this. Since the interface changes
still wildly, it's a bad idea.

Look at Delphi packages: as soon as the interface of a package changes,
you must re-compile all the binaries that use it. The same would be true 
for FPC. I can assure you this is a major headache when distributing apps.


More information about the fpc-devel mailing list