环境变量是 INCLUDE , LIB 和 PATH .在编译期间,编译器在INCLUDE路径中查找头文件,并在链接期间从LIB路径中获取库.OS Windows Vista UltimateI am trying to run a program called minimal.c. When I type at the command line:C:\Users\nathan\Desktop>cl minimal.cMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86Copyright (C) Microsoft Corporation. All rights reserved.minimal.cminimal.c(5) : fatal error C1034: windows.h: no include path setI have set all the paths:C:\Users\nathan\Desktop>pathPATH=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin;C:\Windows\system3;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\ATI Technologies\AT.ACE\Core-Static;C:\Program Files\Intel\DMIX;c:\Program Files (x86)\Microsoft SL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Bin\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Java\jdk1..0_13\bin;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files (x86)\Comon Files\Autodesk Shared\;C:\Program Files (x86)\Microsoft DirectX SDK (March009)\Include;C:\Users\nathan\Desktop\glut-3.7.6-bin\glut-3.7.6-bin;C:\Program Fles (x86)\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files (x86)\Microsof Visual Studio 8\VC\PlatformSDK\Include;C:\Program Files (x86)\Microsoft VisualStudio 8\VC\PlatformSDK\Include\glI have gone and made sure windows.h is in the directory. I'm setting the path too. It'sin C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include.I have Visual Studio 2005.I have exhausted all possibilities. Any ideas? 解决方案 You could also run the vcvars32.bat file from the directory C:\Program Files\Microsoft Visual Studio 8\VC\bin (this is in your path) prior to your cl command.Like this:C:\Users\nathan\Desktop>vcvars32C:\Users\nathan\Desktop>cl minimal.cvcvars32 calls C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat which sets up the required environment for compiling and linking.The environment variables are INCLUDE, LIB, and PATH.The compiler looks for header files in the INCLUDE path during compile, and libraries are fetched from the LIB path during link. 这篇关于错误“致命错误C1034:windows.h:没有包含路径集"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 06:17