[Lazarus] Can I Compile use LCL in FPC?

Mehmet Erol Sanliturk sanliturk at ttmail.com
Sun Sep 20 22:49:32 CEST 2009


Mehmet Erol Sanliturk wrote:
> Mattias Gaertner wrote:
>> On Mon, 21 Sep 2009 00:00:03 +0800
>> yu ping <spingyu at gmail.com> wrote:
>>
>>>  Is there a way to use LCL in FPC?not in Lazarus IDE,
>>> How to do?
>>
>> I'm not sure what you mean with "in FPC".
>> You can compile projects and packages in console/terminal with the
>> "lazbuild" utility.
>>
>> Mattias
>>
>> -- 
>>
> 
> 
> 
> Assume your main program is like the following :
> 
> Program X ;
> 
> Uses
>     Forms ,
>     ... ;
> 
> Begin
> 
> Application . Initialize ;
> Application . CreateForm ( ... ) ;
> Application . Run ;
> 
> End .
> 
> 
> 
> In a command prompt shell :
> 
> fpc X.lpr
> 
> 
> The above statement will compile your X.lpr without Lazarus IDE ,
> BUT you need to supply an fpc.cfg file to specify ALL of the required 
> unit paths in that fpc.cfg as -Fu , -Fi , etc. .
> 
> If your fpc.cfg file is correctly prepared there will not be any problem 
> to compile your X.lpr . If there exists any "Unit not found" , "File not 
> found" , etc. messages , it is necessary to make modifications to your 
> fpc.cfg file to find the missing parts .
> 
> 
> If it is NOT absolutely necessary , using Lazarus is much more easier 
> than using only fpc to compile GUI containing programs .
> 


If you do NOT use fpc executable within Lazarus installation ( means 
using fpc executable supplied by FPC installation ) , it is very likely 
that compilation will destroy your Lazarus installation because .ppu 
files supplied in Lazarus installation will require recompilation by
the FPC fpc executable and then recompilation by Lazarus fpc executable 
in cycles .


> 
> Thank you very much .
> 
> 
> Mehmet Erol Sanliturk
> 
> 
> 
> 
> 




More information about the Lazarus mailing list