[fpc-pascal] linking issues

Marc Santhoff M.Santhoff at t-online.de
Fri Nov 26 12:46:42 CET 2004


Hi,

I'm putting my answer here, thank you all so far.

Using -XX is okay, I understood that (and it works, more than one third
in space is omitted from the target program :).

But with dynamic linking theres something left...

For testing purposes I used "restest.pp" again:

$ fpc -k-dynamic -s restest

Linker script:
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Linking restest
/usr/bin/ld  -L/usr/local/lib -L/usr/X11R6/lib -dynamic   -s -L. -o
restest link.res
if [ $? != 0 ]; then DoExitLink restest; fi

$ locate libgettext
/usr/local/lib/libgettextlib-0.12.1.so
/usr/local/lib/libgettextlib.so
/usr/local/lib/libgettextpo.a
/usr/local/lib/libgettextpo.so
/usr/local/lib/libgettextpo.so.0
/usr/local/lib/libgettextsrc-0.12.1.so
/usr/local/lib/libgettextsrc.so

$ ll restest
-rwxr-xr-x  1 marc  wheel  562867 26 Nov 12:31 restest

$ ldd restest
ldd: restest: not a dynamic executable

That does not do it. There are only some similar named libs, but not
"libgettext.so".

So I have to assume, the unit getext.ppu has to be recompiled for
dynamic linking?

Marc






More information about the fpc-pascal mailing list