1WINDRES(1) GNU Development Tools WINDRES(1)
2
3
4
6 windres - manipulate Windows resources.
7
9 windmc [options] input-file windres [options] [input-file]
10 [output-file]
11
13 windres reads resources from an input file and copies them into an
14 output file. Either file may be in one of three formats:
15
16 "rc"
17 A text format read by the Resource Compiler.
18
19 "res"
20 A binary format generated by the Resource Compiler.
21
22 "coff"
23 A COFF object or executable.
24
25 The exact description of these different formats is available in
26 documentation from Microsoft.
27
28 When windres converts from the "rc" format to the "res" format, it is
29 acting like the Windows Resource Compiler. When windres converts from
30 the "res" format to the "coff" format, it is acting like the Windows
31 "CVTRES" program.
32
33 When windres generates an "rc" file, the output is similar but not
34 identical to the format expected for the input. When an input "rc"
35 file refers to an external filename, an output "rc" file will instead
36 include the file contents.
37
38 If the input or output format is not specified, windres will guess
39 based on the file name, or, for the input file, the file contents. A
40 file with an extension of .rc will be treated as an "rc" file, a file
41 with an extension of .res will be treated as a "res" file, and a file
42 with an extension of .o or .exe will be treated as a "coff" file.
43
44 If no output file is specified, windres will print the resources in
45 "rc" format to standard output.
46
47 The normal use is for you to write an "rc" file, use windres to convert
48 it to a COFF object file, and then link the COFF file into your
49 application. This will make the resources described in the "rc" file
50 available to Windows.
51
53 -i filename
54 --input filename
55 The name of the input file. If this option is not used, then
56 windres will use the first non-option argument as the input file
57 name. If there are no non-option arguments, then windres will read
58 from standard input. windres can not read a COFF file from
59 standard input.
60
61 -o filename
62 --output filename
63 The name of the output file. If this option is not used, then
64 windres will use the first non-option argument, after any used for
65 the input file name, as the output file name. If there is no non-
66 option argument, then windres will write to standard output.
67 windres can not write a COFF file to standard output. Note, for
68 compatibility with rc the option -fo is also accepted, but its use
69 is not recommended.
70
71 -J format
72 --input-format format
73 The input format to read. format may be res, rc, or coff. If no
74 input format is specified, windres will guess, as described above.
75
76 -O format
77 --output-format format
78 The output format to generate. format may be res, rc, or coff. If
79 no output format is specified, windres will guess, as described
80 above.
81
82 -F target
83 --target target
84 Specify the BFD format to use for a COFF file as input or output.
85 This is a BFD target name; you can use the --help option to see a
86 list of supported targets. Normally windres will use the default
87 format, which is the first one listed by the --help option.
88
89 --preprocessor program
90 When windres reads an "rc" file, it runs it through the C
91 preprocessor first. This option may be used to specify the
92 preprocessor to use, including any leading arguments. The default
93 preprocessor argument is "gcc -E -xc-header -DRC_INVOKED".
94
95 -I directory
96 --include-dir directory
97 Specify an include directory to use when reading an "rc" file.
98 windres will pass this to the preprocessor as an -I option.
99 windres will also search this directory when looking for files
100 named in the "rc" file. If the argument passed to this command
101 matches any of the supported formats (as described in the -J
102 option), it will issue a deprecation warning, and behave just like
103 the -J option. New programs should not use this behaviour. If a
104 directory happens to match a format, simple prefix it with ./ to
105 disable the backward compatibility.
106
107 -D target
108 --define sym[=val]
109 Specify a -D option to pass to the preprocessor when reading an
110 "rc" file.
111
112 -U target
113 --undefine sym
114 Specify a -U option to pass to the preprocessor when reading an
115 "rc" file.
116
117 -r Ignored for compatibility with rc.
118
119 -v Enable verbose mode. This tells you what the preprocessor is if
120 you didn't specify one.
121
122 -c val
123 --codepage val
124 Specify the default codepage to use when reading an "rc" file. val
125 should be a hexadecimal prefixed by 0x or decimal codepage code.
126 The valid range is from zero up to 0xffff, but the validity of the
127 codepage is host and configuration dependent.
128
129 -l val
130 --language val
131 Specify the default language to use when reading an "rc" file. val
132 should be a hexadecimal language code. The low eight bits are the
133 language, and the high eight bits are the sublanguage.
134
135 --use-temp-file
136 Use a temporary file to instead of using popen to read the output
137 of the preprocessor. Use this option if the popen implementation is
138 buggy on the host (eg., certain non-English language versions of
139 Windows 95 and Windows 98 are known to have buggy popen where the
140 output will instead go the console).
141
142 --no-use-temp-file
143 Use popen, not a temporary file, to read the output of the
144 preprocessor. This is the default behaviour.
145
146 -h
147 --help
148 Prints a usage summary.
149
150 -V
151 --version
152 Prints the version number for windres.
153
154 --yydebug
155 If windres is compiled with "YYDEBUG" defined as 1, this will turn
156 on parser debugging.
157
158 @file
159 Read command-line options from file. The options read are inserted
160 in place of the original @file option. If file does not exist, or
161 cannot be read, then the option will be treated literally, and not
162 removed.
163
164 Options in file are separated by whitespace. A whitespace
165 character may be included in an option by surrounding the entire
166 option in either single or double quotes. Any character (including
167 a backslash) may be included by prefixing the character to be
168 included with a backslash. The file may itself contain additional
169 @file options; any such options will be processed recursively.
170
172 the Info entries for binutils.
173
175 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
176 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
177 Foundation, Inc.
178
179 Permission is granted to copy, distribute and/or modify this document
180 under the terms of the GNU Free Documentation License, Version 1.2 or
181 any later version published by the Free Software Foundation; with no
182 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
183 Texts. A copy of the license is included in the section entitled "GNU
184 Free Documentation License".
185
186
187
188binutils-2.19.50.0.1 2009-07-28 WINDRES(1)