[Lazarus] Strange dependency of units

Jürgen Hestermann juergen.hestermann at gmx.de
Sun Apr 1 11:04:23 CEST 2012


Mattias Gaertner schrieb:
 > Each package has its own compiler options. For example the LCL units need
 > some flags like inlining and C style operators and some linker options.

Why isn't this simply added to the source files (compiler switches)? It 
would be much easier, rock solid and would even allow different settings 
for each unit. No need for a complicated construct like packages.


 > When you copy a package to another machine you don't have to adapt any
 > search paths or compiler options.

Realy? I think I have to somehow tell Lazarus about a new package, don't 
I? So what is the advantage to clicking on "Load package" or whatever 
and specifying the location path of the package over copying the units 
into the directory where Lazarus expect them?


 > When some compiler option changes or a sub directory is renamed or the
 > package is moved to another location on you disk, you don't have to
 > adapt all your projects that uses the package.

I don't see this. When I rename a directory which Lazarus uses then I 
think it will fail. So in the end I need to tell Lararus about the 
change anyway. I have to find out how and where to do this. What is the 
difference to knowing where to specify search paths and change them?


 > Packages allow to share ppu files. You don't have to recompile
 > the LCL for every project. Each package has its own directory where its
 > ppu files are stored.

That's the concept of units. I just wonder why this is/was not enough.





More information about the Lazarus mailing list