[Lazarus] Compiling LCL units via commandline

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jul 25 15:57:56 CEST 2012

On Wed, 25 Jul 2012 13:26:01 +0200
Reinier Olislagers <reinierolislagers at gmail.com> wrote:

> On 25-7-2012 13:01, luciano de souza wrote:
> > Having reported it in a forum, I member told me about lazbuild. I
> > should manually create a XML file with the project settings and try to
> > compile again. The same error about circular reference is raised.
> Probably because your fpc.cfg is processed by lazbuild as well..

lazbuild does not read fpc.cfg, but it calls the compiler which reads

> > Yes, Lazbuild can be used. But I confess this option strongliy upset
> > me. Lazbuild calls several routines and after all calls FPC. If you
> > imagine the screen reader reads all the output, not having a way to
> > jump the unneeded information, you will evaluate how slow can be the
> > compilation using Lazbuild. The output of FPC is not so verbose, so
> > it's prefferable to use FPC without Lazbuild.
> Most Lazarus users probably use the IDE, which is obviously an issue.
> Lazbuild would seem to be the perfect solution then because it is kept
> up to date with Lazarus changes.
> Perhaps it's a good idea to change lazbuild to use a switch (e.g.
> --quiet or -q) to output less details?

I guess a simply flag is not sufficient. See the many verbosity flags
in the IDE. They were all added on users demand.

> Also, it may be possible to adapt lazbuild to be able to compile your
> example program (and similar programs) without need for creating an .lpi
> or .lpr file.

Some people suggests to use compiler and IDE directives in the lpr
file, which the IDE and lazbuild can use if no lpi is present.

> Alternatively, perhaps some wrapper program could be made that does that
> and calls lazbuild --quiet


More information about the Lazarus mailing list