[Lazarus] Linux Binary without "dynamically linked"?

Aleš Katona almindor at gmail.com
Mon Aug 25 23:06:36 CEST 2008


Dňa Po, 2008-08-25 o 13:32 -0700, Jalal napísal:
> This is more of a FPC question, but I know FPC gurus visit here...
> 
> The file program on Debian shows my Linux command line binary like
> this:
> 
> ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically
> linked (uses shared libs), stripped
> 
> Is it possible to have full static linking? If so, how do I get a
> binary with full static linking? Is there an option that can be used
> on the fpc command line?
> 
> I realize the benefits of dynamic linking, but there are some
> situations where static linking would make life simpler, particularly
> for deployment to machines I do not control.
> 
> Thanks!
> 
> _

You must be using some unit which uses external C libraries. Try just a
hello world program and see what you get then.

All units which link to external C libs (mysql, SDL etc.) will cause
dynamic linking, but the RTL is staticly (smart even) linked so no need
to worry about that.

Ales




More information about the Lazarus mailing list