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?
LVL 1
New_AlexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lomo74Commented:
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 --
0
lomo74Commented:
oh -
%SDK% means wherever you installed the SDK, obviously ;-)
0
New_AlexAuthor Commented:
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

sarabandeCommented:
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
0
sarabandeCommented:
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
0
New_AlexAuthor Commented:
Hi. I have contacted Microsoft and they asked me to upgrade to Microsoft Visual 2010 and then come back to them for support.

Studio 2010 works fine so I will stick with it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
New_AlexAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.