# windres

## NAME



           windres - manipulate Windows resources
    


## SYNOPSIS



           windres [options] [input-file] [output-file]
    


## DESCRIPTION



           **windres** reads resources from an input file and copies them into an
           output file.  Either file may be in one of three formats:
    
           "rc"
               A text format read by the Resource Compiler.
    
           "res"
               A binary format generated by the Resource Compiler.
    
           "coff"
               A COFF object or executable.
    
           The exact description of these different formats is available in
           documentation from Microsoft.
    
           When **windres** converts from the "rc" format to the "res" format, it
           is acting like the Windows Resource Compiler.  When **windres**
           converts from the "res" format to the "coff" format, it is acting
           like the Windows "CVTRES" program.
    
           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 "rc" file 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 "rc" 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
           "coff" file.
    
           If no output file is specified, **windres** will print the resources
           in "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.
    


## OPTIONS



           **-i** _filename_
           **--input** _filename_
               The name of the input file.  If this option is not used, then
               **windres** will use the first non-option argument as the input
               file name.  If there are no non-option arguments, then **windres**
               will read from standard input.  **windres** can not read a COFF
               file from standard input.
    
           **-o** _filename_
           **--output** _filename_
               The name of the output file.  If this option is not used, then
               **windres** will use the first non-option argument, after any used
               for the input file name, as the output file name.  If there is
               no non-option argument, then **windres** will write to standard
               output.  **windres** can not write a COFF file to standard output.
               Note, for compatibility with **rc** the option **-fo** is also
               accepted, but its use is not recommended.
    
           **-J** _format_
           **--input-format** _format_
               The input format to read.  _format_ may be **res** , **rc** , or **coff**.  If
               no input format is specified, **windres** will guess, as described
               above.
    
           **-O** _format_
           **--output-format** _format_
               The output format to generate.  _format_ may be **res** , **rc** , or
               **coff**.  If no output format is specified, **windres** will guess,
               as described above.
    
           **-F** _target_
           **--target** _target_
               Specify the BFD format to use for a COFF file as input or
               output.  This is a BFD target name; you can use the **--help**
               option to see a list of supported targets.  Normally **windres**
               will use the default format, which is the first one listed by
               the **--help** option.
    
           **--preprocessor** _program_
               When **windres** reads an "rc" file, it runs it through the C
               preprocessor first.  This option may be used to specify the
               preprocessor to use.  The default preprocessor is "gcc".
    
           **--preprocessor-arg** _option_
               When **windres** reads an "rc" file, it runs it through the C
               preprocessor first.  This option may be used to specify
               additional text to be passed to preprocessor on its command
               line.  This option can be used multiple times to add multiple
               options to the preprocessor command line.  If the
               **--preprocessor** option has not been specified then a default
               set of preprocessor arguments will be used, with any
               **--preprocessor-arg** options being placed after them on the
               command line.  These default arguments are "-E", "-xc-header"
               and "-DRC_INVOKED".
    
           **-I** _directory_
           **--include-dir** _directory_
               Specify an include directory to use when reading an "rc" file.
               **windres** will pass this to the preprocessor as an **-I** option.
               **windres** will also search this directory when looking for files
               named in the "rc" file.  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.
    
           **-D** _target_
           **--define** _sym_**[=**_val_**]**
               Specify a **-D** option to pass to the preprocessor when reading
               an "rc" file.
    
           **-U** _target_
           **--undefine** _sym_
               Specify a **-U** option to pass to the preprocessor when reading
               an "rc" file.
    
           **-r** Ignored for compatibility with rc.
    
           **-v** Enable verbose mode.  This tells you what the preprocessor is
               if you didn't specify one.
    
           **-c** _val_
           **--codepage** _val_
               Specify the default codepage to use when reading an "rc" file.
               _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.
    
           **-l** _val_
           **--language** _val_
               Specify the default language to use when reading an "rc" file.
               _val_ should be a hexadecimal language code.  The low eight bits
               are the language, and the high eight bits are the sublanguage.
    
           **--use-temp-file**
               Use a temporary file to instead of using popen to read the
               output of the preprocessor. Use this option if the popen
               implementation is buggy on the host (eg., certain non-English
               language versions of Windows 95 and Windows 98 are known to
               have buggy popen where the output will instead go the
               console).
    
           **--no-use-temp-file**
               Use popen, not a temporary file, to read the output of the
               preprocessor.  This is the default behaviour.
    
           **-h**
           **--help**
               Prints a usage summary.
    
           **-V**
           **--version**
               Prints the version number for **windres**.
    
           **--yydebug**
               If **windres** is compiled with "YYDEBUG" defined as 1, this will
               turn on parser debugging.
    
           **@**_file_
               Read command-line options from _file_.  The options read are
               inserted in place of the original @_file_ option.  If _file_ does
               not exist, or cannot be read, then the option will be treated
               literally, and not removed.
    
               Options in _file_ are separated by whitespace.  A whitespace
               character may be included in an option by surrounding the
               entire option in either single or double quotes.  Any
               character (including a backslash) may be included by prefixing
               the character to be included with a backslash.  The _file_ may
               itself contain additional @_file_ options; any such options will
               be processed recursively.
    


* * *