windows programming can't find windows.h

在用控制台编译c++程序的时候,可能会遇到找不到windows.h的情况。这是因为我们在使用cl命令的时候,并没有配置好环境变量。

所以我们在运行cl命令之前,我们可以运行C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat

 

这样配置好环境变量之后,我们就可以使用cl来编译了。

posted @ 2016-11-28 16:03  专属9号  阅读(220)  评论(0编辑  收藏  举报