[fpc-pascal] linking issues

Peter Vreman peter at freepascal.org
Fri Nov 26 10:32:12 CET 2004


> Hi,
>
> I've got two questions on linking:
>
> 1.
> If -XX is used ("try to link smart"), is there any risk of losing needed
> code?
>
> The word "try" in this context irritates me ... don't understand if this
> says "try and see if it works" or "try but your result might get
> corrupted.

When a unit is not smartlinked then it'll be linked using the normal
object file.


> 2.
> When using ressourcestrings and thus linking to gettext, dynamic linking
> with -XD fails. The gettext library is linked statically any time,
> although gtk is linked dynamically. The small test program "restest"
> from the sources is about 350kB big.
>
> Is it possible to link libgettext in dynamically?

-XD only has influence the linking of code in fpc units. How libgettext is
linked by default depends on your OS installation. Only when using -Xt
then every library will be staticly linked (-static is passed to ld)







More information about the fpc-pascal mailing list