Windows. h cannot be found during console compilation caused by updating vs2008 to SP1.
Detected faults:
First install vs5.0, but there is no update for SP1. then install sp1.and then use cl.exe to compile and run it on the console one day. Windows. h.
"Fatal error c1083: cannot open include file: 'windows. H': no such file or directory", I wondered, compile and run everything in vs2008.
Directory containing windows. h file:
C: \ Program Files \ microsoft sdks \ windows \ v6.0a, but c: \ Program Files \ microsoft sdks \ windows \ v6.1 is empty.
The reason is: CL compilation does not point to c: \ Program Files \ microsoft sdks \ windows \ v6.0a, but does not point to v6.1 (because this is empty, so it cannot be found ?)
Solution Test 1:
Set the VC ++ directory
Executable File: Add C:/program files/Microsoft sdks/Windows/v6.0a/bin
Include files: Add C:/program files/Microsoft sdks/Windows/v6.0a/include
Library File: Add C:/program files/Microsoft sdks/Windows/v6.0a/lib
The command line still failed !.
Solution 2:
An error occurred while modifying the update with the installation disk.
Test Solution 3 (final success ):
Enter the vs2008 Command Prompt: use the set command to view the windowssdkdir = c: \ Program Files \ microsoft sdks \ windows \ Platform SDK;
Platform SDK is not installed on my machine.
Edit vsvars32.bat in c: \ Program Files \ Microsoft Visual Studio 9.0 \ common7 \ tools
--------------------------- Vsvars32.bat ------------------------
"Set windowssdkdir = c: \ Program Files \ microsoft sdks \ windows \ v6.0a \"
---------------------------------------------------------------------
OK ~
(Note: The SDK is the software development kit (software development kit). It contains the documentation for Windows software development and the input library and header file of API functions (because the API is in the dynamic link library, these dynamic link libraries are part of the system and therefore do not need to be provided. The input library and header file are required to use API functions in your program ).)
Solution 4:
Download and install the Platform SDK
Http://www.microsoft.com/download/en/search.aspx? Q = psdk