MAN page from RedHat EL 6 toolchain-armiwmmx-2012-2012.12.1-oselas.2.2.x86_64.rpm
Section: GNU Development Tools (1)
windres - manipulate Windows resources.
windres [options] [input-file] [output-file]
reads resources from an input file and copies them intoan output file. Either file may be in one of three formats:
- A text format read by the Resource Compiler.
- A binary format generated by the Resource Compiler.
- A COFF object or executable.
The exact description of these different formats is available indocumentation from Microsoft.
When windres converts from the "rc" format to the "res"format, it is acting like the Windows Resource Compiler. Whenwindres 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 similarbut not identical to the format expected for the input. When an input"rc" file refers to an external filename, an output "rc" filewill instead include the file contents.
If the input or output format is not specified, windres willguess 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 resourcesin "rc" format to standard output.
The normal use is for you to write an "rc" file, use windresto convert it to a COFF object file, and then link the COFF file intoyour application. This will make the resources described in the"rc" file available to Windows.
- -i filename
- --input filename
- The name of the input file. If this option is not used, thenwindres will use the first non-option argument as the input filename. If there are no non-option arguments, then windres willread from standard input. windres can not read a COFF file fromstandard input.
- -o filename
- --output filename
- The name of the output file. If this option is not used, thenwindres will use the first non-option argument, after any usedfor the input file name, as the output file name. If there is nonon-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 alsoaccepted, but its use is not recommended.
- -J format
- --input-format format
- The input format to read. format may be res, rc, orcoff. If no input format is specified, windres willguess, 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. Thisis a BFD target name; you can use the --help option to see a listof supported targets. Normally windres will use the defaultformat, which is the first one listed by the --help option.
- --preprocessor program
- When windres reads an "rc" file, it runs it through the Cpreprocessor first. This option may be used to specify the preprocessorto use, including any leading arguments. The default preprocessorargument is "gcc -E -xc-header -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 -Ioption. windres will also search this directory when looking forfiles named in the "rc" file. If the argument passed to this commandmatches any of the supported formats (as described in the -Joption), it will issue a deprecation warning, and behave just like the-J option. New programs should not use this behaviour. If adirectory 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.
- Ignored for compatibility with rc.
- Enable verbose mode. This tells you what the preprocessor is if youdidn'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 decimalcodepage code. The valid range is from zero up to 0xffff, but thevalidity 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 arethe language, and the high eight bits are the sublanguage.
- Use a temporary file to instead of using popen to read the output ofthe preprocessor. Use this option if the popen implementation is buggyon the host (eg., certain non-English language versions of Windows 95 andWindows 98 are known to have buggy popen where the output will insteadgo the console).
- Use popen, not a temporary file, to read the output of the preprocessor.This is the default behaviour.
- Prints a usage summary.
- Prints the version number for windres.
- If windres is compiled with "YYDEBUG" defined as 1,this will turn on parser debugging.
- Read command-line options from file. The options read areinserted in place of the original @file option. If filedoes not exist, or cannot be read, then the option will be treatedliterally, and not removed.
Options in file are separated by whitespace. A whitespacecharacter may be included in an option by surrounding the entireoption in either single or double quotes. Any character (including abackslash) may be included by prefixing the character to be includedwith a backslash. The file may itself contain additional@file options; any such options will be processed recursively.
the Info entries for binutils
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.3or any later version published by the Free Software Foundation;with no Invariant Sections, with no Front-Cover Texts, and with noBack-Cover Texts. A copy of the license is included in thesection entitled ``GNU Free Documentation License''.
- SEE ALSO
This document was created byman2html,using the manual pages.