Link to home
Start Free TrialLog in
Avatar of New_Alex
New_AlexFlag for Cyprus

asked on

C++ MFC 2008 ERROR: Description: "fatal error C1083: Cannot open include file: 'windows.h':

Description: "fatal error C1083: Cannot open include file: 'windows.h': No such file or directory"
File: "afxv.w32.h"
Line 169

This is the error I get when I try to compile an MFC application in Visual Studio 2008

I have already downloaded and installed the SDK for Microsoft Visual Studio 2008.

Any Ideas?
Avatar of lomo74
lomo74
Flag of Italy image

is your SDK include directory in your include path?
you must add it to INCLUDE environment if you build from command shell, otherwise go to IDE options, locate visual C++ directories, include directories, and make sure %SDK%\include is present --
oh -
%SDK% means wherever you installed the SDK, obviously ;-)
Avatar of New_Alex

ASKER

Thanks lomo


in the List that can be found in:  
View Options / Projects and Solutiona / VC++ Directories / Show directories for: Include files

There is a line:
$(FrameworkSDKDir)include


I don't know if it is this you mean, but even if I copy and paste your line "%SDK%\include" it doesn't seem to get it right ...

What do you think people?
Avatar of sarabande
your include paths should be

$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)\include
$(FrameworkSDKDir)include

that was done by the vs installation. a separate sdk installation normally makes no sense cause it would install nearly the same files somewhere else and you would need to synchronize the environment.

Sara
you can find out what those environment variables mean by openning a cmd window and type for example

set WindowsSdkDir

Open in new window


Sara
ASKER CERTIFIED SOLUTION
Avatar of New_Alex
New_Alex
Flag of Cyprus image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks