VC++6.0 API程序 错误解决办法

1   fatal error C1010: unexpected end of file while looking for precompiled header directive
      可以使用右键点击项目工程中的该cpp文件,选择setting,在c/c++选项卡中,选择Category下拉菜单中的

     PreCompiled headers选项,然后设置第一选项,Not using precompiledHeaders,解决这个问题。
2   Error spawning cl.exe  

     fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
     点击VC“TOOLS(工具)”—>“Option(选择)”—>“Directories(目录)”重新设置“Excutable Fils、

     Include Files、Library Files、Source Files”的路径。
3   error LNK2001: unresolved external symbol _main 

     fatal error LNK1120: 1 unresolved externals symbol _WinMain
     libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main 
      Windows项目要使用Windows子系统, 而不是Console, 可以这样设置: [Project] --> [Settings] --> 选择"Link"属

     性页, 在Project Options中将/subsystem:console改成/subsystem:windows 

 

原文地址:https://www.cnblogs.com/liulei/p/1430444.html