[Lazarus] Lazarus project compile flags
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Jan 30 22:17:06 CET 2015
On Fri, 30 Jan 2015 12:56:12 -0500
Toan Pham <tpham3783 at gmail.com> wrote:
> Hi,
>
>
> When we compile an object-pascal/delphi project, we generally rely on
> Lazarus to do the work.
> Yet, normally Lazarus knows how a project is setup and knows link the
> project with its run-time library. This is good, but not so good if you
> want to compile the application without lazarus.
>
>
> So, as an example, a object pascal project may have the following FPC_FLAGS:
>
> -MObjFPC -Scghi -O1 -g -gl -vewnhi -Filib/i386-linux -Fl/opt/gnome/lib
> -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux/gtk2
> -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux
> -Fu/usr/lib/lazarus/1.2.4/components/lazutils/lib/i386-linux
> -Fu/usr/lib/lazarus/1.2.4/packager/units/i386-linux -Fu. -FUlib/i386-linux
> -l -dLCL -dLCLgtk2
>
> These directives are the equivalent of C++/C, compile and link flags.
> Typically we call pkg-config to find out the flags when we compile a c/C++
> application. Is there a lazarus/fpc utility that is equivalent to
> pkg-config that would allow me to find out these flags at compile/configure
> time?
>
> I really want to be able to build a project without lazarus, and on
> different machine machines.
You can use lazbuild to build without the IDE. You can build lazbuild
on machines without GUI libraries:
make lazbuild
Mattias
More information about the Lazarus
mailing list