After I ported the Windows Delphi application to the FPC Linux console application, I tried to run the program with a graphical interface. I installed the latest Lazarus on my Windows machine and converted a simple hello world application. One device has a form (.dfm file in Delphi). This form has been converted to Lazarus .lfm and .lrs files. But there is a problem with compiling this:
windres: C:/htlib/pas/FInfo.lrs:1: syntax error
Free Pascal Compiler version 2.2.4 [2009/10/25] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling lazarus_test.lpr
...
Compiling C:\htlib\pas\FInfo.pas
Compiling resource C:\htlib\pas\FInfo.lrs
d:\lazarus\fpc\2.2.4\bin\i386-win32\windres.exe: C:/htlib/pas/FInfo.lrs:1: syntax error
C:\htlib\pas\FInfo.pas(366,1) Error: Error while linking
C:\htlib\pas\FInfo.pas(366,1) Fatal: There were 1 errors compiling module, stopping
The first lines of the FInfo.lrs file, which looks like a text file (not binary as .res files):
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmInfo','FORMDATA',[
'TPF0'
In the designer, I can see and edit this form, so I think that it was transformed with success. Maybe something is wrong with the .lrs file? Should it be binary as .res files? What to do to compile this form?
EDIT
.pas :
{$R *.lrs}