WINDRES(1)
π NAME π
okay bestie, this is the manual page for windres from the GNU Development Tools crew, and her whole thing is manipulating Windows resources. No cap, she reads resources from an input file and copies them into an output file. π«Ά
β¨ SYNOPSIS β¨
windres [options] [input-file] [output-file]
slay. that's the whole shape of it.
π¦ DESCRIPTION π¦
windres reads resources from an input file and copies them into an output file. Either file may be in one of three formats:
rcβ it's giving text format, read by the Resource Compiler. πresβ a binary format generated by the Resource Compiler. β¨coffβ a COFF object or executable. π
The exact description of these different formats is available in documentation from Microsoft.
When windres converts from the rc format to the res format, it is acting like the Windows Resource Compiler. When windres converts from the res format to the coff format, it is acting like the Windows CVTRES program. iykyk. π₯
When windres generates an rc file, the output is similar but not identical to the format expected for the input. When an input rc file refers to an external filename, an output rc file will instead include the file contents. not me noticing that glow-up detail. π
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. A file with an extension of .rc will be treated as an rc file, a file with an extension of .res will be treated as a res file, and a file with an extension of .o or .exe will be treated as a coff file. she's lowkey intuitive like that. πΈ
If no output file is specified, windres will print the resources in rc format to standard output.
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. periodt. π
πΈ OPTIONS πΈ
highkey here's the full menu, bestie β every flag, every default, no skips. π
-i filename,--input filenameβ 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.windrescan not read a COFF file from standard input. π-o filename,--output filenameβ 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. Note, for compatibility withrcthe option-fois also accepted, but its use is not recommended. π©-J format,--input-format formatβ The input format to read. format may beres,rc, orcoff. If no input format is specified,windreswill guess, as described above.-O format,--output-format formatβ The output format to generate. format may beres,rc, orcoff. If no output format is specified,windreswill guess, as described above.-F target,--target targetβ 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.--preprocessor programβ 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-arg optionβ 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. π-I directory,--include-dir directoryβ 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. 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, just prefix it with./to disable the backward compatibility. π-D target,--define sym[=val]β Specify a-Doption to pass to the preprocessor when reading anrcfile. π-U target,--undefine symβ Specify a-Uoption to pass to the preprocessor when reading anrcfile.-rβ Ignored for compatibility withrc.-vβ Enable verbose mode. This tells you what the preprocessor is if you didn't specify one. π-c val,--codepage valβ 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.-l val,--language valβ 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.--use-temp-fileβ Use a temporary file 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). π--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.-V,--versionβ Prints the version number forwindres.--yydebugβ Ifwindresis compiled withYYDEBUGdefined as1, this will turn on parser debugging.@fileβ Read command-line options from file. The options read are inserted in place of the original@fileoption. 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.
π SEE ALSO π
- the Info entries for
binutils. π
π COPYRIGHT π
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". π«Ά
xoxo, your Unix bestie, signing off from binutils-2.45.1 on 2025-11-24 π
β¨
π¦ where this page comes from
- alpine 3.23: binutils-doc 2.45.1-r0 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms