[fpc-pascal]How to shrink the executable size?

Jonas Maebe jonas at zeus.rug.ac.be
Sun Oct 1 15:16:55 CEST 2000

On Sat, 30 Sep 2000, Frank McCormick wrote:

> Sebastian> > -CX is indeed for creating smartlinkable units. -XX is to turn on
> Sebastian> > smartlinking.
> Now I am confused!  When I compile a win32 program using the compiler
> and RTL from baseW32.zip snapshot, I have to add -XX on the command line
> or the program demands opengl32.dll.  Is the RTL in BaseW32.zip compiled
> with smartlinking turned on ??

The win32 RTL is compiled so that you can smartlink it (ie. with -CX)
(well, at least the windows unit where these opengl references are in is
anyway). However, when you compile a unit with -CX, both a smartlinkable
(libxxxx.a) and non-smartlinkable (xxxx.o) are created and which one is
used depends on whether or not you use -XX.

You can add -XX to your ppc386.cfg, then it will always try to use the
smartlinkable version if available. You may get some messages about units
which are not smartlinkable though (at least with 1.0, I believe they are
now only written if you use -vt)


More information about the fpc-pascal mailing list