[fpc-pascal] I am offering a $100 reward for linking static libraries

Pierre Muller pierre at freepascal.org
Mon Aug 22 23:42:33 CEST 2022

Le 22/08/2022 à 18:18, Henry Vermaak via fpc-pascal a écrit :
> On Sun, 21 Aug 2022 at 18:34, Anthony Walter via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
>> I am also able to use mingw32 gcc to compile this same C source into a static library for Windows using these two commands while inside the folder containing the Chipmunk2D sources:
>> x86_64-w64-mingw32-gcc-win32 -static -static-libgcc -std=gnu99 -ffast-math src/*.c -Iinclude -c
> -static and -static-libgcc are linking options, so they won't do
> anything here.  You'll have to link libgcc in manually in your pascal
> source.

   You can always pass option to the external linker using '-k' option:
Use -k-static (without space)
or -k-lc
or -k-L -k/DIR/

   It can be good to use 'vx' option to see what is the command line really generated by
the Free Pascal compiler when calling the external linker.


More information about the fpc-pascal mailing list