[Lazarus] Size of program executable very big...

waldo kitty wkitty42 at windstream.net
Sat Feb 19 02:54:29 CET 2011


On 2/18/2011 06:08, Mattias Gaertner wrote:
> Bo Berglund <bo.berglund at gmail.com> hat am 18. Februar 2011 um 11:43 geschrieben:
>
>  >[...]
>  > Couldn't Lazarus be "smart" about the code generation as follows:
>  > 1) When one clicks the run button (green arrow) lazarus creates the
>  > exe file with embedded debug information such that breakpoints etc
>  > work for debugging.
>  >
>  > 2) When one uses the build function Lazarus does NOT use the compile
>  > option to enter debug data into the exe, thus creating the slimmer
>  > file.
>  >
>  > With this one would get the best of both worlds, right?
>
> No, that would be a bug. "Compile" let the compiler compile all new, "Build"
> recompiles all units of the project.
>
> You can define a second build mode "release" and enable whatever optimization
> you think is appropriate for your customers.

i recently ran into this in plain FPC when i switched from DEBUG to RELEASE mode 
and had to re-enter the unit and include directories the project i'm working on 
needed... it was a bit of a shock to have them "lost" when switching modes but a 
quick look in the fpc.cfg showed me the problem :)  no clue if this also applies 
to lazarus, though... i've not even attempted to use laz's graphical environment 
for this particular console only tool build...




More information about the Lazarus mailing list