[fpc-pascal] Statically link library
Marco van de Voort
marcov at stack.nl
Sun Apr 21 14:36:54 CEST 2013
In our previous episode, Vittorio Giovara said:
> > {$linklib gcc}
> >
> > What other libraries should I add? BTW, I'm compiling the C library with MinGW.
>
> You need to instruct fpc to use gcc instead of default ld when you
> link c/pas code statically.
Fpc can't call gcc.
> This is because gcc adds many linker flags that are automatically set
> when you link something but are not set when you call ld directly.
FPC can pass extra flags to the linker. Just harvest the flags by compiling
a simple program with gcc
More information about the fpc-pascal
mailing list