[fpc-devel] fpcres error?
Martin Frb
lazarus at mfriebe.de
Tue Nov 17 17:41:56 CET 2026
On 17/11/2026 17:25, Ondrej Pokorny via fpc-devel wrote:
> On 11/17/2026 5:15 PM, Martin Frb via fpc-devel wrote:
>> https://gitlab.com/freepascal.org/lazarus/lazarus/-/work_items/42648
>>
>> It seems fpcres requires quotes, where windres not only does not
>> require them, but fails if they are present.
>
> {$R sources.rc} is not valid syntax. See
> https://www.freepascal.org/docs-html/prog/progse59.html
>
> You must feed {$R xxx} with a RES file: {$R sources.res}
>
> As an undocumented alternative that accepts an RC file you can use
> {$R 'a.rc' 'a.res'}.
Well the current behaviour as far as I can tell is
{$R foo.res} => includes an EXISTING file name foo.res
This resource file must already exist in the res format.
{$R foo.rc} => compiles the rc file (at least if windres is avail, and I
was under the impression in future also with fpcres)
Then includes the resulting foo.res file
I am not sure if the latter form checks for a pre-existing res file.
More information about the fpc-devel
mailing list