我编写了一段程序,编译也通过了,但在制作EXE时,出现了如下错误:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/SMS.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
请教各位大虾。

解决方案 »

  1.   

    产生这种error的原因有很多,例如仅仅导入了类文件,但并没有将它拷入当前工程空间所在目录,你可以看看FILE VIEW 里external 文件夹里提示了什么信息
      

  2.   

    CAUSE
    A project of type Application is a Windows-based application, so it requires the WinMain function as the entry point. 
    RESOLUTION
    Create a new project and select Console Application as the Project Type, or add a project to the existing Project. 
    maybe another reson you use Unicode,for more details ,see
    PRB: Error LNK2001: '_WinMain@16': Unresolved External Symbol 
    ID: Q125750 
    PRB: Wrong Project Selection Causes LNK2001 on _WinMain@16 
    ID: Q131204