[fpc-devel] RTTI unit

Michael Van Canneyt michael at freepascal.org
Mon Aug 30 11:23:25 CEST 2010



On Mon, 30 Aug 2010, Sven Barth wrote:

> Am 30.08.2010 10:15, schrieb Graeme Geldenhuys:
>> Op 2010-08-30 09:45, Sven Barth het geskryf:
>>> LPI files are already included with FPC. E.g. for the compiler itself
>>> (so you don't need to add all search paths manually...) and for the
>>> Win32 RTL (excluding the system unit).
>> 
>> FPC has support for external config files which could handle this for you.
>> In the fpGUI project I have many such config files called "extrafpc.cfg".
>> Each line of that config file is a compiler parameter, you can use IFDEF
>> functionality and even FPC's macros. See the example below.
>> 
>
> [...]
>
>> In addition to such external config files, FPC also includes the
>> fpcmake.pas functionality. This again allows it to setup search paths etc.
>> for a project, even the compiler itself.
>> 
>> 
>> BTW:
>> Lazarus IDE can read such external config files too, so again it is very
>> easy to setup a Lazarus project using a program unit, and simply telling it
>> to read the extrafpc.cfg file for search path information. With MSEide you
>> can do the same.
>
> I'll find a reason to include *.lpi files... I'll find one... I'll find 
> one... damn... I failed :P
>
> It might be practical to extend Lazarus (and maybe the other IDEs as well) to 
> auto search for an extrafpc.cfg in the same dir as the program file so that 
> it is used automatically.

That presupposes that the use of extrafpc.cfg is a common thing. 
It is not, this is something that Graeme uses.

> Does identifier search/completion work in Lazarus if you use a extrafpc.cfg 
> to define search paths?
>
> Another possibility would be to extend fpcmake to generate different IDE 
> project files besides the Makefile as well.

fpcmake will be phased out, it's a bad idea to extend it.

Michael.



More information about the fpc-devel mailing list