
Check if the compiler is the correct version.Lazarus 2.x requires at least FPC 3.0.0.Lazarus 1.0 requires at least FPC 2.6.0.Lazarus 1.0.8 requires at least FPC 2.6.2.See Using_the_LCL_without_Lazarus What version of FPC is required? See Using_the_LCL_without_Lazarus How do I build other Free Pascal programs that use LCL without the Lazarus IDE? Is it possible to build Lazarus projects without the Lazarus IDE? Qt (supported on Linux, Windows and OSX) then use the LCL_PLATFORM argument: cd lazarus If you want to build Lazarus for different widgetset eg. This way the compiler knows where to find the libraries. This typically requires more manual coding though.Įxclude image readers See If your app does not use images compressed in one of those formats, then you can exclude it. Projects that don't use the LCL are much smaller (this is similar to some non-GUI C++ frameworks). Lazarus executable size starts big, but grows very slowly, because of the way the LCL is designed, and its use of certain Free Pascal features (RTTI). Note: only do this if you don't need to run the debugger. Project|Compiler Options|Linking|Link Style|Link Smart (-XX) -> Checked Project|Compiler Options|Linking|Debugging| Uncheck all except Strip Symbols From Executable (-Xs) Project|Compiler Options|Code|Smart Linkable (-CX) -> Checked Quick guide to Lazarus/FPC application size reduction But once your program is working well, you may delete those infos and reduce the size of the binary. It uses the extra-information stored in your binary to test it. A debugger is a program that is used to test your code.


The binaries are big because they include a lot of debug information necessary for using gdb (GNU Debugger). Its aim is write once, compile anywhere: you should be able to just recompile your program source code with Lazarus running on another operating system (or a cross compiler) and get a program that runs on that operating system.įor more details see Overview of Free Pascal and Lazarus Why are the generated binaries so big?

Lazarus is a cross-platform integrated development environment (IDE) that lets you create visual (GUI) and non-visual Object Pascal programs, and uses the Free Pascal compiler to generate your executable. Note: This FAQ may be outdated in certain parts.
