windres may be used to manipulate Windows resources.
Warning: windres is not always built as part of the binary utilities, since it is only useful for Windows targets.
windres [options] [input-file] [output-file]
windres reads resources from an input file and copies them into an output file. Either file may be in one of three formats:
The exact description of these different formats is available in documentation from Microsoft.
When windres converts from the
rc format to the
format, it is acting like the Windows Resource Compiler. When
windres converts from the
res format to the
format, it is acting like the Windows
When windres generates an
rc file, the output is similar
but not identical to the format expected for the input. When an input
rc file refers to an external filename, an output
will instead include the file contents.
If the input or output format is not specified, windres will
guess based on the file name, or, for the input file, the file contents.
A file with an extension of .rc will be treated as an
file, a file with an extension of .res will be treated as a
res file, and a file with an extension of .o or
.exe will be treated as a
If no output file is specified, windres will print the resources
rc format to standard output.
The normal use is for you to write an
rc file, use windres
to convert it to a COFF object file, and then link the COFF file into
your application. This will make the resources described in the
rc file available to Windows.
rcfile, it runs it through the C preprocessor first. This option may be used to specify the preprocessor to use, including any leading arguments. The default preprocessor argument is
gcc -E -xc-header -DRC_INVOKED.
rcfile. windres will pass this to the preprocessor as an -I option. windres will also search this directory when looking for files named in the
rcfile. If the argument passed to this command matches any of the supported formats (as described in the -J option), it will issue a deprecation warning, and behave just like the -J option. New programs should not use this behaviour. If a directory happens to match a format, simple prefix it with `./' to disable the backward compatibility.
rcfile. val should be a hexadecimal prefixed by `0x' or decimal codepage code. The valid range is from zero up to 0xffff, but the validity of the codepage is host and configuration dependent.
rcfile. val should be a hexadecimal language code. The low eight bits are the language, and the high eight bits are the sublanguage.
1, this will turn on parser debugging.