windows.h no such file or directory
I am working on getting a new compiler and the one im looking at is MVC(not sure if the ++ are included on the end lol). Anyways, my current compiler is Dev 4.9.2 and it compiles and runs my program just fine. But when I moved the code over to the MVC and tried it, it didnt work. I got the same error multiple times. So then I downloaded Platform SDK and added in the lib,bin and include files I was supposed to. I also changed a line of code that had kerbel.lib or something like that on it(which I was supposed to do). And I still cant get it to work.
here is the error message:
Code:
fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
This is how I used it in the actual code:
Code:
#include <iostream>
#include <windows.h>
I tried changing windows.h to windows and that didnt work either. So im nnot really sure wat else to do. If someone could explain to me why it doesnt work and/or how to fix it that would be great.
The #include <windows.h> not working problem...SOLVED!
Okay, I have noticed a lot of people having this problem(myself included), on this board, and all accross google; I think that I have discovered the error though; The error is with microsoft's "using platform sdk with visual c++" instruction page, which is located at http://msdn.microsoft.com/vstudio/ex...k/default.aspx; The paths that they provide are inaccurate; It says:
Code:
Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.
Add the paths to the appropriate subsection:
Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
But this is incorrect; It should actually say:
Code:
Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.
Add the paths to the appropriate subsection:
Executable files: C:\Program Files\Microsoft Platform SDK\Bin
Include files: C:\Program Files\Microsoft Platform SDK\Include
Library files: C:\Program Files\Microsoft Platform SDK\Lib
If that doesn't work for you, all you have to do is when you are adding a path, instead of copying and pasting the path, click on the "..." button at the end of the box and then browse to the directory that Microsoft Platform SDK is saved at, then doubleclick on the folder named "Bin", "Include", or "Lib", depending on what path you are changing; This worked for me, so chances are it will also work for you;