Console ÇÁ·ÎÁ§Æ®¿Í Windows ÇÁ·ÎÁ§Æ® ¹Ù²Ù±â


1.¿ä¾à

VC++ ÀÇ Project Wizard ¿¡¼­ »ý¼ºÇÑ Console ÇÁ·ÎÁ§Æ®¸¦ Windows Application ÇÁ·ÎÁ§Æ®·Î ¹Ù²Ù´Â ¹æ¹ý¿¡ ´ëÇØ¼­ ¾Ë¾Æº¾´Ï´Ù.


2.º»¹®

VC++ À» °¡Áö°í ÇÁ·ÎÁ§Æ®¸¦ ¸¸µé´Ù º¸¸é, óÀ½¿¡ ½±°Ô ½Ç¼öÇÒ¼ö ÀÖ´Â ºÎºÐÀÌ ¹Ù·Î Windows Application °ú Console ÇÁ·ÎÁ§Æ®¸¦ ±¸ºÐÇÏÁö ¸øÇÑä ÇÁ·ÎÁ§Æ®¸¦ ¸¸µç´Ù´Â °ÍÀÔ´Ï´Ù. ÀÌ·± »óȲÀº ÀÚÁÖ ÀϾ¸ç, Ãʺ¸ÀÚµéÀº ÀÌ·± »óȲÀ» ¸¸³µÀ»¶§ »ó´çÈ÷ È¥¶õ½º·¯¿ö ÇÕ´Ï´Ù. Windows Application À» À§ÇÑ Project¸¦ ¸¸µé¾úÁö¸¸, ½ÇÁ¦·Î Console ÇÁ·ÎÁ§Æ®¸¦ ¸¸µé·Á°í ÇÑ´Ù¸é, ¾Æ·¡¿Í °°Àº Link ¿¡·¯¸¦ ¸¸³¯¼ö ÀÖ½À´Ï´Ù.

LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 

Debug/Console.exe : fatal error LNK1120: 1 unresolved externals 
±×·³ Windows Application ÇÁ·ÎÁ§Æ®¸¦ ¾î¶»°Ô Console ÇÁ·ÎÁ§Æ®¸¦ ¹Ù²Ü ¼ö ÀÖÀ»±î¿ä? ½ÇÁ¦·Î µÎ ÇÁ·ÎÁ§Æ® ¼ÂÆÃÀÇ Â÷ÀÌÁ¡Àº ¾Æ·¡ÀÇ µÎ°¡Áö¿¡¼­ ³ªÅ¸³³´Ï´Ù.

[Project Settings..]
+--> [C/C++] --> Preprocessor definitions : _WINDOWS or _CONSOLE
+--> [Link] --> Projects Options : /subsystem:windows or /subsystem:console
µû¶ó¼­ À§ÀÇ ¼³Á¤À» Console °ú Windows ¿¡ ¸Â°Ô ¼³Á¤ÇØ ÁÖ½Ã¸é µÇ°Ú½À´Ï´Ù.

¸¸ÀÏ Windows Application À¸·Î ¸¸µç°æ¿ì¶ó¸é, À§ÀÇ µÎ°¡Áö °æ¿ì¿¡¼­ _CONSOLE °ú /subsystem:console ·Î º¯°æÇÏ¸é µÇ°ÚÁÒ..



- 2001.08.13 Smile Seo -