On Thu, 4 May 2023, Ondrej Pokorny via lazarus wrote:

Hello,

I see that the LCL includes LFM files as resources directly without a *.RC file:

{$R *.lfm}

---

But if I do this with my custom file. E.g.:

{$R *.sql}

I get an "error when compiling resources":

Compile Project, Mode: Debug, Target: Test.exe: Exit code 1, Errors: 1, Warnings: 1
Warning: windres: can't open file `REPLACE': No such file or directory
uTest.pas(96,0) Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates.

---

How is it possible that the LFM files are included directly but *.SQL files are parsed as RC files?

Because the file extension is recognized ? LFM is included as RC_DATA, and probably everything that is not .lfm is assumed to be a RC format.

I believe fpcres also has this check.

Michael.
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to