Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-12

Static build

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

A.J. Venter

Hi guys,
How would I go about to build a lazarus program completely statically.

The program in question needs to run from a very minimal environment, and no other program will ever run there. It would be great if I can just statically link it against GTK/GDK etc. so I don't need the libraries separately.

Ciao
A.J.

"The reason Santa is so jolly is that he knows where all the bad girls live." A.J. Venter DireqLearn Tech Guru www.direqlearn.org www.silentcoder.cjb.net (personal site)

Reply by email

Mattias Gaertner
to A.J. Venter: How would I go about to build a lazarus program completely statically. The program in…
Show quoted text 7 lines
Hi guys, How would I go about to build a lazarus program completely statically. The program in question needs to run from a very minimal environment, and no other program will ever run there. It would be great if I can just statically link it against GTK/GDK etc. so I don't need the libraries separately.

See Run -> Compiler Options -> Linking -> Options
Check "Pass Options to Linker ..." and add -static to the options.

Make sure you have all static libs installed.

BTW. Does someone know, why the compiler option -XS does not work?

Mattias

Reply by email