[fpc-devel] Enabling use of {$R *.dfm} on Windows

Sergei Gorelkin sergei_gorelkin at mail.ru
Thu Jul 26 16:53:05 CEST 2007


Michael Van Canneyt wrote:
> 
> On Wed, 25 Jul 2007, Sergei Gorelkin wrote:
> 
>> Michael Van Canneyt wrote:
>>> Hi,
>>>
>>> The name of the resource linker can now be set with -FR<x>. This binary
>>> should transform a resource file file to a .o file.
>>>
>>> You can also specify the name of the recource compiler with -FC. This binary
>>> should transform a resource source file to a .o file.
>>> (normally used for .rc files)
>>>
>>> Both options expect the name of a binary (will be searched in the PATH), and
>>> the binary should handle the same options as windres does. 
>> To make sure that I understand things right:
>> - The new utility is supposed to be invoked as 'fpc -FR<name> <all other 
>> options>';
> 
> Yes.
> 
>> - The new utility has nothing to do with -FC switch;
> 
> Currently not.
> 
After initial testing with r8164, things appear to be exactly opposite 
than I imagined initially: the utility must be specified in -FC switch 
and has nothing to do with -FR. This is due to recent changes in 
resource handling, I guess.

Basically it works this way (the only required thing is to change 
"windres1" name back to "windres" in windr.pp).

However, I ended up realizing that my binutils (2.9.5) are too outdated. 
Windres 2.9.5 has a bug - it does not round resource header length up to 
a dword boundary, so created .res files are correct only if resource 
name length is odd. This bug appears to be fixed in recent 2.17.50, but 
in turn it does not work without '--use-temp-file' commandline switch...
I believe I must set this stuff up properly before going further.

So the questions are:
1) what version of binutils is the 'current' for FPC development?
2) Is it possible to download it somewhere in one piece like 
crossbinutils (i.e. compiled binaries for win32 only and without fpc 
binaries)?

Sergei




More information about the fpc-devel mailing list