[Lazarus] Lazarus project compile flags

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Jan 31 00:55:50 CET 2015


On Fri, 30 Jan 2015 18:09:11 -0500
Toan Pham <tpham3783 at gmail.com> wrote:

>[...]
> 1.  Download the source code & unzip it
> 2.  We want to configure it, without opengl support (just to illustrate
> this example)
>      ./configure --disable-opengl
> 
> 3.  When we do this, auto-tool would call pkg-config (another utility), and
> see if it has libcairo version 2.1 and freefont library version 1.1 (for
> example).
> 
> 4.  If the dependencies are satisfied, pkg-config also tells auto-tool
> where to look for the libraries, by giving the CFLAGS and LFLAGS

About cflags:
Not usable by fpc.

About lflags:
The -l parameters are auto created by the compiler.
This usually leaves none or very few options.

For example $(pkg-config --cflags --libs gtk+-2.0) provides no option
needed by fpc.

About needed libraries:
Because of the above it usually works in FPC the other way
round. You compile and if a library is missing you get an error
message. You then install the missing library and try again.

Nevertheless you are right, it would be nice if you could get the list
of needed libraries without compiling. You can use a
tool like auto-tool for that.


Mattias




More information about the Lazarus mailing list