[Lazarus] Lazarus project compile flags

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Feb 3 00:05:26 CET 2015


On Mon, 2 Feb 2015 17:05:42 -0500
Toan Pham <tpham3783 at gmail.com> wrote:

> Thank you guys,
> 
> I'll evaluate lazbuild, and see how well it integrates into my build
> environment.

Pascal programmers are spoiled. That's we are trying to
simplify compilation. For example FPC and
Lazarus themselves do not need ./configure. Simply compile.

 
> I really like the build system of c/c++, and that's why I would like to
> know if there is a way to use the same build system for fpc projects.  For
> instance, if I were to compile a c++ project that uses the wxWidget
> library, calling the wx-config utility is sufficient to compile the
> project(eg. wx-config --libs).  The LCL library is similar to the wxWidget
> library, having a utility like lcl-config (eg. lcl-config --libs), would
> simplify the fpc build process; and would make it possible to convert any
> fpc project to a makefile build project.

Lazarus takes this a step further. lazbuild does not only compile your
project, it automatically rebuilds all used Lazarus packages if
needed. For example when compiling your project for Linux, it will
fully automatically compile the LCL. When you cross compile your
project for Windows, it will automatically compile the LCL for Windows.

The "--libs" parameters are usually stored in the sources. So the
compiler knows what libs are needed.

If you want something like make, you might want to take a
look at "fpmake".

> @Michael Van - let's say  you have one build environment, how are you able
> to manage cross-building for many machine types (i486, pentium etc), and
> different architectures (x86, arm)?

See here:
http://wiki.lazarus.freepascal.org/Cross_compiling


Mattias




More information about the Lazarus mailing list