WINDRES(1)
๐ WINDRES ๐
ok so bestie, welcome to windres โ the GNU Development Tools girlie who manipulates Windows resources โจ like she literally reads resources from an input file and copies them into an output file, no cap. it's giving "glow-up for your .rc files" and honestly? iconic.
โจ SYNOPSIS โจ
windres [options] [input-file] [output-file]
๐ฆ DESCRIPTION ๐ฆ
okay so real talk: windres reads resources from an input file and copies them into an output file. and either one of those files can be in one of three formats, periodt:
rcโ a text format read by the Resource Compiler. very "I write my resources by hand" main character energy ๐resโ a binary format generated by the Resource Compiler. mysterious. binary. slay.coffโ a COFF object or executable. the final form fr fr.
the exact description of these different formats is available in documentation from Microsoft โ like, go ask Redmond, bestie, she has the lore ๐
when windres converts from the rc format to the res format, it is acting like the Windows Resource Compiler. she's cosplaying! and when windres converts from the res format to the coff format, it is acting like the Windows CVTRES program. versatile queen ๐
when windres generates an rc file, the output is similar but not identical to the format expected for the input. ๐ and when an input rc file refers to an external filename, an output rc file will instead include the file contents. so it just... absorbs the file. ate and left no crumbs.
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. she's intuitive like that ๐
so:
- a file with an extension of
.rcwill be treated as anrcfile - a file with an extension of
.reswill be treated as aresfile - a file with an extension of
.oor.exewill be treated as acofffile
if no output file is specified, windres will print the resources in rc format to standard output. lowkey the most casual flex ever.
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. that's the whole vibe. that's the pipeline. iykyk.
๐ธ OPTIONS ๐ธ
-ifilename,--inputfilename โ the name of the input file. if this option is not used, thenwindreswill use the first non-option argument as the input file name. and if there are no non-option arguments, thenwindreswill read from standard input. โ ๏ธ but heads up bestie:windrescan not read a COFF file from standard input. that's a no.-ofilename,--outputfilename โ the name of the output file. if this option is not used, thenwindreswill 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, thenwindreswill write to standard output. โ ๏ธwindrescan not write a COFF file to standard output either. also note, for compatibility withrcthe option-fois also accepted, but its use is not recommended. it's giving deprecated-but-still-invited-to-the-party ๐-Jformat,--input-formatformat โ the input format to read. format may beres,rc, orcoff. if no input format is specified,windreswill guess, as described above. ๐ฎ-Oformat,--output-formatformat โ the output format to generate. format may beres,rc, orcoff. if no output format is specified,windreswill guess, as described above. same guessing energy, different direction ๐ซ-Ftarget,--targettarget โ specify the BFD format to use for a COFF file as input or output. this is a BFD target name; you can use the--helpoption to see a list of supported targets. normallywindreswill use the default format, which is the first one listed by the--helpoption. first place = default, she's predictable like that ๐--preprocessorprogram โ whenwindresreads anrcfile, it runs it through the C preprocessor first. this option may be used to specify the preprocessor to use. the default preprocessor isgcc. ๐ง--preprocessor-argoption โ whenwindresreads anrcfile, 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--preprocessoroption has not been specified then a default set of preprocessor arguments will be used, with any--preprocessor-argoptions being placed after them on the command line. these default arguments are-E,-xc-headerand-DRC_INVOKED. memorise those, bestie ๐-Idirectory,--include-dirdirectory โ specify an include directory to use when reading anrcfile.windreswill pass this to the preprocessor as an-Ioption.windreswill also search this directory when looking for files named in thercfile. ๐๏ธ now the messy part: if the argument passed to this command matches any of the supported formats (as described in the-Joption), it will issue a deprecation warning, and behave just like the-Joption. new programs should not use this behaviour. if a directory happens to match a format, simple prefix it with./to disable the backward compatibility. crisis averted ๐ซก-Dtarget,--definesym[=val] โ specify a-Doption to pass to the preprocessor when reading anrcfile. ๐-Utarget,--undefinesym โ specify a-Uoption to pass to the preprocessor when reading anrcfile. undefine her, she's over it ๐ โโ๏ธ-rโ ignored for compatibility withrc. literally just vibing in the options list, doing nothing, still invited ๐ซฅ-vโ enable verbose mode. this tells you what the preprocessor is if you didn't specify one. she's nosy and we love that ๐-cval,--codepageval โ specify the default codepage to use when reading anrcfile. val should be a hexadecimal prefixed by0xor decimal codepage code. the valid range is from zero up to0xffff, but the validity of the codepage is host and configuration dependent. โ ๏ธ so like, in range โ guaranteed valid, girly. it depends on your host and config ๐-lval,--languageval โ specify the default language to use when reading anrcfile. val should be a hexadecimal language code. the low eight bits are the language, and the high eight bits are the sublanguage. bit math, but make it cute โจ--use-temp-fileโ use a temporary file to instead of usingpopento read the output of the preprocessor. use this option if thepopenimplementation is buggy on the host (eg., certain non-English language versions of Windows 95 and Windows 98 are known to have buggypopenwhere the output will instead go the console). ๐ญ retro Windows trauma, we remember--no-use-temp-fileโ usepopen, not a temporary file, to read the output of the preprocessor. this is the default behaviour. the standard girlie ๐-h,--helpโ prints a usage summary. ๐-V,--versionโ prints the version number forwindres. ๐--yydebugโ ifwindresis compiled withYYDEBUGdefined as1, this will turn on parser debugging. only if she was built that way, bestie โ otherwise this option is just knocking on a locked door ๐ช@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. it's files all the way down ๐
๐ SEE ALSO ๐
- the Info entries for
binutils. go read her, she's the source ๐ซถ
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
copyright (c) 1991-2026 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.47, dated 2026-08-26 โ shoutout to the footer girlies, mwah ๐ periodt. ๐๐
๐ฆ where this page comes from
- arch rolling: loongarch64-linux-gnu-binutils 2.47-1 ยท GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND GFDL-1.3-or-later AND FSFAP
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms