Windows. h solution not found

Source: Internet
Author: User

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

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.