WINDRES(1)
π NAME π
okay so bestie, meet windres β the little icon that manipulates Windows resources β¨ like it literally reads them, copies them, converts them, the whole glow-up. periodt.
πΈ SYNOPSIS πΈ
windres [options] [input-file] [output-file]
that's it. that's the whole vibe. input goes in, output comes out, options do the seasoning π§
π¦ DESCRIPTION π¦
so windres reads resources from an input file and copies them into an output file. no cap. and either one of those files can be in one of three formats:
"rc"β a text format read by the Resource Compiler. it's giving readable, it's giving cute π"res"β a binary format generated by the Resource Compiler. mysterious. iconic. not for human eyes π"coff"β a COFF object or executable.
the exact description of these different formats lives in documentation from Microsoft, so if you want the deep lore, go there bestie π«Ά
when windres converts from the "rc" format to the "res" format, it is acting like the Windows Resource Compiler. and when windres converts from the "res" format to the "coff" format, it is acting like the Windows "CVTRES" program. range, versatility, main character energy π
when windres generates an "rc" file, the output is similar but not identical to the format expected for the input. lowkey a plot twist. and when an input "rc" file refers to an external filename, an output "rc" file will instead include the file contents β so it's not pointing at the file anymore, it's bringing the file. obsessed π
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. the guessing rules, fr fr:
- a file with an extension of
.rcgets treated as an"rc"file - a file with an extension of
.resgets treated as a"res"file - a file with an extension of
.oor.exegets treated as a"coff"file
if no output file is specified, windres will print the resources in "rc" format to standard output. so it just yaps them at your terminal, and honestly? valid β¨
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 pipeline bestie, that's the routine, and it slays every time π
π 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. if there are no non-option arguments, thenwindreswill read from standard input. heads up though:windrescan not read a COFF file from standard input π-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. and again:windrescan not write a COFF file to standard output. also, note, for compatibility withrcthe option-fois also accepted, but its use is not recommended π-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 π-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 π--preprocessorprogram β whenwindresreads an"rc"file, 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 an"rc"file, 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-header"and"-DRC_INVOKED"β¨-Idirectory,--include-dirdirectory β specify an include directory to use when reading an"rc"file.windreswill pass this to the preprocessor as an-Ioption.windreswill also search this directory when looking for files named in the"rc"file. β οΈ 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. iykyk π«Ά-Dtarget,--definesym[=val] β specify a-Doption to pass to the preprocessor when reading an"rc"file.-Utarget,--undefinesym β specify a-Uoption to pass to the preprocessor when reading an"rc"file.-rβ ignored for compatibility withrc. it's just there. it's a decorative little guy. we love them anyway π-vβ enable verbose mode. this tells you what the preprocessor is if you didn't specify one. nosy in the best way π-cval,--codepageval β specify the default codepage to use when reading an"rc"file. 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, it depends bestie π-lval,--languageval β specify the default language to use when reading an"rc"file. val should be a hexadecimal language code. the low eight bits are the language, and the high eight bits are the sublanguage. bit math? in my manpage? it's more likely than you think β--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 problems, retro solutions π¦--no-use-temp-fileβ usepopen, not a temporary file, to read the output of the preprocessor. this is the default behaviour β¨-h,--helpβ prints a usage summary. your little map πΊοΈ-V,--versionβ prints the version number forwindres.--yydebugβ ifwindresis compiled with"YYDEBUG"defined as1, this will turn on parser debugging. deep cut. only for the truly curious π₯@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. so it just stays there, unbothered, moisturised, in its lane π
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 β yes bestie, it can nest. inception core π
π SEE ALSO π
the Info entries for binutils. go read them, they're right there, they're free πΈ
π 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 thing, bestie!! π«Ά this page is from binutils-2.47, dated 2026-09-19, and it goes by WINDRES(1) π now go convert some resources, you absolute icon β¨π
π
π¦ where this page comes from
- ubuntu stonking: binutils-sh-elf 2.47+3build2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms