1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Copyright (C) 1991-2021 Free Software Foundation, Inc.
4
5Permission is granted to copy, distribute and/or modify this document
6under the terms of the GNU Free Documentation License, Version 1.3
7or any later version published by the Free Software Foundation;
8with no Invariant Sections, with no Front-Cover Texts, and with no
9Back-Cover Texts.  A copy of the license is included in the
10section entitled "GNU Free Documentation License".
11 -->
12<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
13<head>
14<title>GNU Binary Utilities: windmc</title>
15
16<meta name="description" content="GNU Binary Utilities: windmc">
17<meta name="keywords" content="GNU Binary Utilities: windmc">
18<meta name="resource-type" content="document">
19<meta name="distribution" content="global">
20<meta name="Generator" content="makeinfo">
21<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22<link href="index.html#Top" rel="start" title="Top">
23<link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
24<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
25<link href="index.html#Top" rel="up" title="Top">
26<link href="windres.html#windres" rel="next" title="windres">
27<link href="addr2line.html#addr2line" rel="previous" title="addr2line">
28<style type="text/css">
29<!--
30a.summary-letter {text-decoration: none}
31blockquote.smallquotation {font-size: smaller}
32div.display {margin-left: 3.2em}
33div.example {margin-left: 3.2em}
34div.indentedblock {margin-left: 3.2em}
35div.lisp {margin-left: 3.2em}
36div.smalldisplay {margin-left: 3.2em}
37div.smallexample {margin-left: 3.2em}
38div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
39div.smalllisp {margin-left: 3.2em}
40kbd {font-style:oblique}
41pre.display {font-family: inherit}
42pre.format {font-family: inherit}
43pre.menu-comment {font-family: serif}
44pre.menu-preformatted {font-family: serif}
45pre.smalldisplay {font-family: inherit; font-size: smaller}
46pre.smallexample {font-size: smaller}
47pre.smallformat {font-family: inherit; font-size: smaller}
48pre.smalllisp {font-size: smaller}
49span.nocodebreak {white-space:nowrap}
50span.nolinebreak {white-space:nowrap}
51span.roman {font-family:serif; font-weight:normal}
52span.sansserif {font-family:sans-serif; font-weight:normal}
53ul.no-bullet {list-style: none}
54-->
55</style>
56
57
58</head>
59
60<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
61<a name="windmc"></a>
62<div class="header">
63<p>
64Next: <a href="windres.html#windres" accesskey="n" rel="next">windres</a>, Previous: <a href="addr2line.html#addr2line" accesskey="p" rel="previous">addr2line</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
65</div>
66<hr>
67<a name="windmc-1"></a>
68<h2 class="chapter">11 windmc</h2>
69
70<p><code>windmc</code> may be used to generator Windows message resources.
71</p>
72<blockquote>
73<p><em>Warning:</em> <code>windmc</code> is not always built as part of the binary
74utilities, since it is only useful for Windows targets.
75</p></blockquote>
76
77
78<div class="smallexample">
79<pre class="smallexample">windmc [options] input-file
80</pre></div>
81
82
83<p><code>windmc</code> reads message definitions from an input file (.mc) and
84translate them into a set of output files.  The output files may be of
85four kinds:
86</p>
87<dl compact="compact">
88<dt><code>h</code></dt>
89<dd><p>A C header file containing the message definitions.
90</p>
91</dd>
92<dt><code>rc</code></dt>
93<dd><p>A resource file compilable by the <code>windres</code> tool.
94</p>
95</dd>
96<dt><code>bin</code></dt>
97<dd><p>One or more binary files containing the resource data for a specific
98message language.
99</p>
100</dd>
101<dt><code>dbg</code></dt>
102<dd><p>A C include file that maps message id&rsquo;s to their symbolic name.
103</p></dd>
104</dl>
105
106<p>The exact description of these different formats is available in
107documentation from Microsoft.
108</p>
109<p>When <code>windmc</code> converts from the <code>mc</code> format to the <code>bin</code>
110format, <code>rc</code>, <code>h</code>, and optional <code>dbg</code> it is acting like the
111Windows Message Compiler.
112</p>
113
114
115<dl compact="compact">
116<dt><code>-a</code></dt>
117<dt><code>--ascii_in</code></dt>
118<dd><p>Specifies that the input file specified is ASCII. This is the default
119behaviour.
120</p>
121</dd>
122<dt><code>-A</code></dt>
123<dt><code>--ascii_out</code></dt>
124<dd><p>Specifies that messages in the output <code>bin</code> files should be in ASCII
125format.
126</p>
127</dd>
128<dt><code>-b</code></dt>
129<dt><code>--binprefix</code></dt>
130<dd><p>Specifies that <code>bin</code> filenames should have to be prefixed by the
131basename of the source file.
132</p>
133</dd>
134<dt><code>-c</code></dt>
135<dt><code>--customflag</code></dt>
136<dd><p>Sets the customer bit in all message id&rsquo;s.
137</p>
138</dd>
139<dt><code>-C <var>codepage</var></code></dt>
140<dt><code>--codepage_in <var>codepage</var></code></dt>
141<dd><p>Sets the default codepage to be used to convert input file to UTF16. The
142default is ocdepage 1252.
143</p>
144</dd>
145<dt><code>-d</code></dt>
146<dt><code>--decimal_values</code></dt>
147<dd><p>Outputs the constants in the header file in decimal. Default is using
148hexadecimal output.
149</p>
150</dd>
151<dt><code>-e <var>ext</var></code></dt>
152<dt><code>--extension <var>ext</var></code></dt>
153<dd><p>The extension for the header file. The default is .h extension.
154</p>
155</dd>
156<dt><code>-F <var>target</var></code></dt>
157<dt><code>--target <var>target</var></code></dt>
158<dd><p>Specify the BFD format to use for a bin file as output.  This
159is a BFD target name; you can use the <samp>--help</samp> option to see a list
160of supported targets.  Normally <code>windmc</code> will use the default
161format, which is the first one listed by the <samp>--help</samp> option.
162<a href="Target-Selection.html#Target-Selection">Target Selection</a>.
163</p>
164</dd>
165<dt><code>-h <var>path</var></code></dt>
166<dt><code>--headerdir <var>path</var></code></dt>
167<dd><p>The target directory of the generated header file. The default is the
168current directory.
169</p>
170</dd>
171<dt><code>-H</code></dt>
172<dt><code>--help</code></dt>
173<dd><p>Displays a list of command-line options and then exits.
174</p>
175</dd>
176<dt><code>-m <var>characters</var></code></dt>
177<dt><code>--maxlength <var>characters</var></code></dt>
178<dd><p>Instructs <code>windmc</code> to generate a warning if the length
179of any message exceeds the number specified.
180</p>
181</dd>
182<dt><code>-n</code></dt>
183<dt><code>--nullterminate</code></dt>
184<dd><p>Terminate message text in <code>bin</code> files by zero. By default they are
185terminated by CR/LF.
186</p>
187</dd>
188<dt><code>-o</code></dt>
189<dt><code>--hresult_use</code></dt>
190<dd><p>Not yet implemented. Instructs <code>windmc</code> to generate an OLE2 header
191file, using HRESULT definitions. Status codes are used if the flag is not
192specified.
193</p>
194</dd>
195<dt><code>-O <var>codepage</var></code></dt>
196<dt><code>--codepage_out <var>codepage</var></code></dt>
197<dd><p>Sets the default codepage to be used to output text files. The default
198is ocdepage 1252.
199</p>
200</dd>
201<dt><code>-r <var>path</var></code></dt>
202<dt><code>--rcdir <var>path</var></code></dt>
203<dd><p>The target directory for the generated <code>rc</code> script and the generated
204<code>bin</code> files that the resource compiler script includes. The default
205is the current directory.
206</p>
207</dd>
208<dt><code>-u</code></dt>
209<dt><code>--unicode_in</code></dt>
210<dd><p>Specifies that the input file is UTF16.
211</p>
212</dd>
213<dt><code>-U</code></dt>
214<dt><code>--unicode_out</code></dt>
215<dd><p>Specifies that messages in the output <code>bin</code> file should be in UTF16
216format. This is the default behaviour.
217</p>
218</dd>
219<dt><code>-v</code></dt>
220<dt><code>--verbose</code></dt>
221<dd><p>Enable verbose mode.
222</p>
223</dd>
224<dt><code>-V</code></dt>
225<dt><code>--version</code></dt>
226<dd><p>Prints the version number for <code>windmc</code>.
227</p>
228</dd>
229<dt><code>-x <var>path</var></code></dt>
230<dt><code>--xdgb <var>path</var></code></dt>
231<dd><p>The path of the <code>dbg</code> C include file that maps message id&rsquo;s to the
232symbolic name. No such file is generated without specifying the switch.
233</p></dd>
234</dl>
235
236
237
238<hr>
239<div class="header">
240<p>
241Next: <a href="windres.html#windres" accesskey="n" rel="next">windres</a>, Previous: <a href="addr2line.html#addr2line" accesskey="p" rel="previous">addr2line</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
242</div>
243
244
245
246</body>
247</html>
248