Go to the first, previous, next, last section, table of contents.


windres

windres may be used to manipulate Windows resources.
windres´Â Windows ¸®¼Ò½º¸¦ ´Ù·é´Ù.

Warning: windres is not always built as part of the binary utilities, since it is only useful for Windows targets.
ÁÖÀÇ! windresÀº Windows Ÿ°Ù¿¡¼­¸¸ »ç¿ëÇϱ⠶§¹®¿¡ ÄÄÆÄÀϽà »ý¼ºµÇÁö ¾ÊÀ» ¼ö ÀÖ´Ù.


windres [options] [input-file] [output-file]

windres reads resources from an input file and copies them into an output file. Either file may be in one of three formats:

windres´Â ÀÔ·Â ÆÄÀÏ¿¡¼­ ¸®¼Ò½º¸¦ Àо Ãâ·Â ÆÄÀÏ·Î º¹»çÇÑ´Ù. °¢ ÆÄÀÏÀº ´ÙÀ½ ¼¼ Çü½Ä Áß ÇϳªÀÌ´Ù.

rc
A text format read by the Resource Compiler.
¸®¼Ò½º ÄÄÆÄÀÏ·¯°¡ Àд ÅؽºÆ® Çü½Ä
res
A binary format generated by the Resource Compiler.
¸®¼Ò½º ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÏ´Â ÀÌÁø Çü½Ä
coff
A COFF object or executable.
COFF ¿ÀºêÁ§Æ® ȤÀº ½ÇÇàÆÄÀÏ

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.

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.

°¢ Çü½ÄÀÇ ÀÚ¼¼ÇÑ ¼³¸íÀº MicrosoftÀÇ ¹®¼­¸¦ Âü°íÇ϶ó.

windres°¡ rc Çü½ÄÀ» res Çü½ÄÀ¸·Î º¯È¯ÇÒ ¶§ Windows ¸®¼Ò½º ÄÄÆÄÀÏ·¯¿Í °°ÀÌ ÇൿÇÑ´Ù. res Çü½ÄÀ» coff Çü½ÄÀ¸·Î º¯È¯ÇÒ ¶§ Windows CVTRES ÇÁ·Î±×·¥ °°ÀÌ ÇൿÇÑ´Ù.

windresÀÌ »ý¼ºÇÑ rc ÆÄÀÏÀº ÀÔ·ÂÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Â Çü½Ä°ú ºñ½ÁÇÏÁö¸¸ µ¿ÀÏÇÏÁö´Â ¾Ê´Ù. ÀÔ·Â rc ÆÄÀÏÀÌ ´Ù¸¥ ÆÄÀϸíÀ» ÂüÁ¶ÇÑ´Ù¸é Ãâ·Â rc ÆÄÀÏÀº ´ë½Å ±× ÆÄÀÏ ³»¿ëÀ» Á÷Á¢ Æ÷ÇÔÇÑ´Ù.

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.

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.
ÀÔÃâ·Â Çü½ÄÀ» ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é ÆÄÀϸí°ú (ÀÔ·Â ÆÄÀÏÀÇ °æ¿ì) ÆÄÀÏ ³»¿ëÀ» º¸°í ÆÇ´ÜÇÑ´Ù. È®ÀåÀÚ°¡ `.rc'ÀÎ ÆÄÀÏÀº rc ÆÄÀÏ·Î Ãë±ÞµÇ°í, `.res'´Â res ÆÄÀÏ·Î, `.o'³ª `.exe'´Â coff ÆÄÀÏ·Î Ãë±ÞµÈ´Ù.

Ãâ·Â ÆÄÀÏÀ» ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é rc Çü½ÄÀ¸·Î Ç¥ÁØÃâ·Â¿¡ Ãâ·ÂÇÑ´Ù.

º¸Åë rc ÆÄÀÏÀ» ÀÛ¼ºÇÏ¿© windresÀ¸·Î COFF ¿ÀºêÁ§Æ® ÆÄÀÏ·Î º¯È¯ÇÑ ÈÄ ÇÁ·Î±×·¥°ú °°ÀÌ ¸µÅ©ÇÏ°Ô µÈ´Ù. ±×·¡¼­ rc ÆÄÀÏ¿¡ ±â¼úµÈ ¸®¼Ò½º¸¦ Windows°¡ »ç¿ëÇÏ°Ô µÈ´Ù.

-i filename
--input filename
The name of the input file. If this option is not used, then windres will use the first non-option argument as the input file name. If there are no non-option arguments, then windres will read from standard input. windres can not read a COFF file from standard input.
ÀÔ·Â ÆÄÀÏ À̸§. ÀÌ ¿É¼ÇÀ» »ç¿ëÇÏÁö ¾ÊÀ¸¸é, ¿É¼ÇÀÌ ¾Æ´Ñ ù¹ø° ¾Æ±Ô¸ÕÆ®¸¦ ÀÔ·Â ÆÄÀÏ À̸§À¸·Î »ç¿ëÇÑ´Ù. ¸¸¾à ÀÌ·± ¾Æ±Ô¸ÕÆ®°¡ ¾ø´Ù¸é Ç¥ÁØÀÔ·ÂÀ» Àд´Ù. windresÀº Ç¥ÁØÀÔ·ÂÀ¸·Î COFF ÆÄÀÏÀ» ÀÐÁö ¸øÇÑ´Ù.
-o filename
--output filename
The name of the output file. If this option is not used, then windres will 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, then windres will write to standard output. windres can not write a COFF file to standard output.
Ãâ·Â ÆÄÀÏ À̸§. ÀÌ ¿É¼ÇÀ» »ç¿ëÇÏÁö ¾ÊÀ¸¸é, (ÀÔ·Â ÆÄÀÏ À̸§À¸·Î »ç¿ëÇÒ °Í ´ÙÀ½ÀÇ) ¿É¼ÇÀÌ ¾Æ´Ñ ù¹ø° ¾Æ±Ô¸ÕÆ®¸¦ Ãâ·Â ÆÄÀÏ À̸§À¸·Î »ç¿ëÇÑ´Ù. ¸¸¾à ÀÌ·± ¾Æ±Ô¸ÕÆ®°¡ ¾ø´Ù¸é Ç¥ÁØÃâ·ÂÀ¸·Î Ãâ·ÂÇÑ´Ù. windresÀº Ç¥ÁØÃâ·ÂÀ¸·Î COFF ÆÄÀÏÀ» Ãâ·ÂÇÏÁö ¸øÇÑ´Ù.
-I format
--input-format format
The input format to read. format may be `res', `rc', or `coff'. If no input format is specified, windres will guess, as described above.
ÀÔ·Â Çü½Ä. formatÀº `res', `rc', `coff' Áß ÇϳªÀÌ´Ù. ÀÔ·Â Çü½ÄÀÌ ÁöÁ¤µÇÁö ¾ÊÀ¸¸é À§¿¡¼­ ¼³¸íÇѵ¥·Î ÃßÃøÇÑ´Ù.
-O format
--output-format format
The output format to generate. format may be `res', `rc', or `coff'. If no output format is specified, windres will guess, as described above.
Ãâ·Â Çü½Ä. formatÀº `res', `rc', `coff' Áß ÇϳªÀÌ´Ù. Ãâ·Â Çü½ÄÀÌ ÁöÁ¤µÇÁö ¾ÊÀ¸¸é À§¿¡¼­ ¼³¸íÇѵ¥·Î ÃßÃøÇÑ´Ù.
-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 --help option to see a list of supported targets. Normally windres will use the default format, which is the first one listed by the --help option. section Target Selection.
ÀÔÃâ·ÂÀ¸·Î »ç¿ëÇÒ COFF ÆÄÀÏÀÇ BFD Çü½ÄÀ» ÁöÁ¤ÇÑ´Ù. ÀÌ´Â BFD Ÿ°Ù À̸§ÀÌ´Ù. Áö¿øÇϴ Ÿ°ÙÀº --help ¿É¼ÇÀ¸·Î ¾Ë ¼ö ÀÖ´Ù. º¸ÅëÀÇ °æ¿ì --help ¿É¼Ç¿¡¼­ óÀ½¿¡ ³ª¿À´Â, ±âº» Çü½ÄÀ» »ç¿ëÇÑ´Ù.
--preprocessor program
When windres reads an rc file, it runs it through the C preprocessor first. This option may be used to specify the preprocessor to use, including any leading arguments. The default preprocessor argument is gcc -E -xc-header -DRC_INVOKED.
rcÀ» ÀÐÀ» ¶§ ¸ÕÀú C Àü󸮱⸦ Åë°ú½ÃŲ´Ù. ÀÌ ¿É¼ÇÀ¸·Î Àü󸮱â¿Í »ç¿ëÇÒ ¾Æ±Ô¸ÕÆ®¸¦ ÁöÁ¤ÇÑ´Ù. ±âº» Àü󸮱â¿Í ¾Æ±Ô¸ÕÆ®´Â gcc -E -xc-header -DRC_INVOKEDÀÌ´Ù.
--include-dir directory
Specify an include directory to use when reading an rc file. windres will pass this to the preprocessor as an -I option. windres will also search this directory when looking for files named in the rc file.
rc ÆÄÀÏÀ» ÀÐÀ» ¶§ »ç¿ëÇÒ ÀÎŬ·çµå µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù. windres´Â À̸¦ -I ¿É¼ÇÀ¸·Î Àü󸮱⿡ Àü´ÞÇÑ´Ù. ¶Ç rc ÆÄÀÏ¿¡ ³ª¿À´Â ÆÄÀÏÀ» ã±â À§Çؼ­ ÀÌ µð·ºÅ丮¸¦ °Ë»çÇÑ´Ù.
-D sym[=val]
--define sym[=val]
Specify a -D option to pass to the preprocessor when reading an rc file.
rc ÆÄÀÏÀ» ÀÐÀ» ¶§ Àü󸮱⿡ ³Ñ°ÜÁÙ -D ¿É¼ÇÀ» ÁöÁ¤ÇÑ´Ù.
-v
Enable verbose mode. This tells you what the preprocessor is if you didn't specify one.
ÀÚ¼¼ÇÏ°Ô Ãâ·ÂÇÑ´Ù. Àü󸮱⸦ ÁöÁ¤ÇÒÁö ¾Ê¾ÒÀ» ¶§ ¾î¶² °ÍÀÌ »ç¿ëµÇ´ÂÁö ¾Ë·ÁÁØ´Ù.
--language val
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.
rc ÆÄÀÏÀ» ÀÐÀ» ¶§ »ç¿ëÇÒ ±âº» ¾ð¾î¸¦ ÁöÁ¤ÇÑ´Ù. valÀº 16 Áø¼öÀÇ ¾ð¾î ÄÚµåÀÌ´Ù. ³·Àº 8 ºñÆ®°¡ ¾ð¾îÀÌ°í, ³ôÀº 8 ºñÆ®´Â ºÎ¼ö¾ð¾îÀÌ´Ù.
--use-temp-file
Use a temporary file to instead of using popen to read the output of the preprocessor. Use this option if the popen implementation is buggy on the host (eg., certain non-English language versions of Windows 95 and Windows 98 are known to have buggy popen where the output will instead go the console).
Àü󸮱âÀÇ Ãâ·ÂÀ» popenÀ¸·Î ÀÐÁö ¾Ê°í Àӽà ÆÄÀÏÀ» »ç¿ëÇÑ´Ù. È£½ºÆ®ÀÇ popen ±¸Çö¿¡ ¹ö±×°¡ ¸¹Àº °æ¿ì ÀÌ ¿É¼ÇÀ» »ç¿ëÇÑ´Ù. (¾î¶² ºñ¿µ¾î±Ç Window 95¿Í Window 98¿¡¼­ popenÀº Ãâ·ÂÀ» ÄַܼΠº¸³½´Ù.)
--no-use-temp-file
Use popen, not a temporary file, to read the output of the preprocessor. This is the default behaviour.
Àü󸮱âÀÇ Ãâ·ÂÀ» Àбâ À§Çؼ­ Àӽà ÆÄÀÏÀ» »ç¿ëÇÏÁö ¾Ê°í popenÀ» »ç¿ëÇÑ´Ù. ÀÌ°ÍÀÌ ±âº» ÇൿÀÌ´Ù.
--help
Prints a usage summary.
»ç¿ë¹ýÀ» °£´ÜÈ÷ Ãâ·ÂÇÑ´Ù.
--version
Prints the version number for windres.
windresÀÇ ¹öÀüÀ» Ãâ·ÂÇÑ´Ù.
--yydebug
If windres is compiled with YYDEBUG defined as 1, this will turn on parser debugging.
windres°¡ YYDEBUGÀ» 1·Î ÄÄÆÄÀÏµÈ °æ¿ì, Æļ­ÀÇ µð¹ö±ëÀ» ÀÛµ¿½ÃŲ´Ù.


Go to the first, previous, next, last section, table of contents.