WINDMC(1)

πŸ’– WINDMC(1) πŸ’–

okay bestie, welcome to windmc β€” it's one of the GNU Development Tools and it's literally the Windows Message Compiler's twin, no cap. Let's get into it 🫢


✨ NAME ✨

windmc β€” generates Windows message resources. that's it, that's the job πŸ’…


🌸 SYNOPSIS 🌸

windmc [options] input-file

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: windmc reads message definitions from an input file (.mc, obviously) and translates them into a whole little family of output files. and when I say family, I mean four kinds, bestie:

  • "h" β€” a C header file that contains the message definitions.
  • "rc" β€” a resource file, compilable by the windres tool.
  • "bin" β€” one or more binary files holding the resource data for a specific message language.
  • "dbg" β€” a C include file that maps message id's to their symbolic name.

the exact description of these different formats? it's available in documentation from Microsoft, so go look, i'm not making stuff up πŸ’€

when windmc converts from the mc format to the bin format, rc, h, and optional dbg, it is acting like the Windows Message Compiler. main character energy, honestly πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -a, --ascii_in β€” says the input file you gave is ASCII. this is the default behaviour, so it's giving "i was already doing this, but go off" 🌸
  • -A, --ascii_out β€” says messages in the output bin files should be in ASCII format.
  • -b, --binprefix β€” says bin filenames have to be prefixed by the basename of the source file.
  • -c, --customflag β€” sets the customer bit in all message id's. cute little bit, love that for it.
  • -C codepage, --codepage_in codepage β€” sets the default codepage used to convert the input file to UTF16. the default is ocdepage 1252. (yes that's exactly what the page says, i'm just the messenger 😭)
  • -d, --decimal_values β€” outputs the constants in the header file in decimal. default is hexadecimal output.
  • -e ext, --extension ext β€” the extension for the header file. the default is the .h extension.
  • -F target, --target target β€” specify the BFD format to use for a bin file as output. this is a BFD target name, and you can use the --help option to see a list of supported targets. normally windmc uses the default format, which is the first one listed by the --help option.
  • -h path, --headerdir path β€” the target directory of the generated header file. the default is the current directory.
  • -H, --help β€” displays a list of command-line options and then exits. the classic.
  • -m characters, --maxlength characters β€” tells windmc to generate a warning if the length of any message exceeds the number you specified. keeping you humble fr fr.
  • -n, --nullterminate β€” terminate message text in bin files by zero. by default they're terminated by CR/LF.
  • -o, --hresult_use β€” not yet implemented, bestie, so don't come for me. it instructs windmc to generate an OLE2 header file using HRESULT definitions. status codes are used if the flag is not specified.
  • -O codepage, --codepage_out codepage β€” sets the default codepage used to output text files. the default is ocdepage 1252.
  • -r path, --rcdir path β€” the target directory for the generated rc script and the generated bin files that the resource compiler script includes. the default is the current directory.
  • -u, --unicode_in β€” says the input file is UTF16.
  • -U, --unicode_out β€” says messages in the output bin file should be in UTF16 format. this is the default behaviour ✨
  • -v, --verbose β€” enable verbose mode. yap mode: ON.
  • -V, --version β€” prints the version number for windmc.
  • -x path, --xdgb path β€” the path of the dbg C include file that maps message id's to the symbolic name. no such file is generated without specifying the switch, so don't be surprised when it's just not there πŸ™ˆ
  • @ file β€” read command-line options from file. the options that get read are inserted in place of the original @file option. if file doesn't exist, or can't be read, then the option gets treated literally and is not removed.

options inside file are separated by whitespace. a whitespace character can be included in an option by surrounding the entire option in either single or double quotes. any character (including a backslash) can be included by prefixing the character you want in there with a backslash. and plot twist β€” the file may itself contain additional @file options, and any such options will be processed recursively. it's giving inception πŸŒ€


🌈 SEE ALSO 🌈

the Info entries for binutils. go read, i'll wait πŸ’œ


Copyright (c) 1991-2025 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".


and that's the whole page, bestie πŸŽ€ this was binutils-2.45.50, dated 2025-12-09, and it's still WINDMC(1) at the end of the day. slay, stay safe, and always read your manpages πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from