[lazarus] compiling delphi projects...

Marc Weustink marc at lazarus.dommelstein.net
Mon May 28 17:31:27 EDT 2001


At 10:45 28-05-01 +0200, Cyril LAMY wrote:
>Hi,
>when i try to compile delphi projects under
>lazarus(linux), I have an error at the line :
>
>{$R *.DFM}
>
>How can I solve this problem ?

Lazarus (or better Linux) doesn't know about resources, so you can't use 
them in the way Delphi/win32 does. However Lazarus uses a method pretty 
compatible with this.

1) You need a textual DFM
     D4: created by copy/paste from ALT-F12
     D5: Native

2) Create a lrc file with lazres (in lazarus/tools)
     lazres yourform.lrc yourform.dfm

3) Add the following lines to yourform.pp
     initialization
       {$I yourform.lrc}


Please keep in mind that not all properties in the dfm are supported yet by 
lazarus, so you might get a crash.

HTH Marc






More information about the Lazarus mailing list