[fpc-devel] first results of using fpc resources instead of lazarus resources

Paul Ishenin ip at kmiac.ru
Mon Nov 30 05:33:03 CET 2009


Hello, FPC developers' list.

This weekend Mattias has implemented an option for the IDE to use FPC 
resources for projects and packages. Loading of forms from such 
resources were made before so there are no more limitations to start use 
them instead of LRS files.

So I converted one our work project units to {R *.lfm} directive instead 
  of {$I *.lrs}. And as soon as I tried to compile I've got an error:
"Error while compiling resources". Not informative at all. I scanned the 
compiler sources for this error and found with what arguments fpcres was 
started.

I started it from the command line and found the real error:
"No known file format detected for file 
'C:\paul\projects\medavia\lib\i386-win32\fr_page_request2.lfm'"

Can compiler show me 2 errors instead of one:

Error while compiling resources:
No known file format detected for file 
'C:\paul\projects\medavia\lib\i386-win32\fr_page_request2.lfm'

Of course I checked what is so uniques in that fr_page_request2.lfm and 
found utf8 BOM at the beginning of the file. I can't find whether this 
was lazarus or fpc who writes the BOM. I also can't understand why only 
one file has it. I compared with other lfm files - they also have 
russian strings and they have no BOM.

So if BOM can present in the LFM then fpcres detection method needs to 
be adjusted or in other case writer needs to be fixed.

--
Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list