[lazarus] Classes and shared objects

Michal Bukovjan bukovjan at mbox.dkm.cz
Wed Nov 6 02:39:25 EST 2002


Tony Maro wrote:
> On Tue, 2002-11-05 at 06:45, Vasily I. Volchenko wrote:
> 
>>As I see, it was a great problem. So, lazarus executables are huge.
> 
> 
> I disagree with that.  If you compile without all the debug code, it's
> quite small.  My entire CheckBook Tracker application is still less than
> 2 MB and it's no small application.  It's a heck of a lot smaller than
> everything required to run GnuCash with it's library structure.  And
> look how many people can't even get GnuCash to run.   If you want a
> distributable small executable, uncheck "Display Line Numbers" and check
> "Strip Symbols from Executable" in the linking options in Lazarus before
> building.
> 
> If you start placing things in shared objects that everyone's different
> app tries to access suddenly it will look like Linux and you'll have
> people whining that "My XYZ app requires version 0.9.8 and my ABC app
> required 1.0.3 and they won't work together..."  NOT having required
> libraries is exactly what drove me to Delphi and Lazarus to begin with.
> 
Just FYI...

You can avoid this easily on Linux by using versioning, like in .so 
files. So you would end up with:

lib/lazvcl.0.9.8.so
lib/lazvcl.1.0.3.so
lib/lazvcl.1 -> lazvcl.1.0.3 (symlink)
lib/lazvcl.0 -> lazvcl.0.9.8 (symlink)
lib/lazvcl.so -> lazvcl.1 (symlink)

and linking either to exact version of library, or version 1, or just 
any version. On Windows, this should be technically possible, too.

And you can turn off shared libs/packages in Delphi, too (in fact, I 
never turn it on).

Michal






More information about the Lazarus mailing list