[fpc-pascal] static linking vs dynamic linking

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Jan 19 13:39:49 CET 2010


Hi,

In fpGUI based applications I have always used static link to libraries
like Xlib or Xft, using the units xlib.pas and xft.pas

I want to add spellchecker support (from a C library) to one of my
applications. So what is better, to continue using static linking, or
rather use dynamic linking (via dynlibs unit)?

What would be the pros and cons of each?

Only thing with dynamic linking that I can see, is than 'ldd <myapp>'
doesn't list the spellchecker library. I also believe, using dynamic
linking under linux binds you to the linux C library.
The only other pro for dynamic linking i can see, is that if the
spellchecker library is not available, only spellcheck support will be
disabled and the application can still continue running. I guess this would
be the deciding factor - is it a requirement or an optional extra having
spellchecker support.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list