New installation of Visual Studio 2015 will not compile anything

I have been using VS 2008, and have installed VS 2015 side by side on the same computer. I have projects compiled in VS 20015 from another computer that compile just fine. But when I open those projects and try to compile them in the new VS 2015 on this computer they will not compile. In fact, even creating the simplest "Hello world" application will not compile.

I get errors on standard VS header files. For example, it throws errors and warnings on Windows.h like:

Warning      C4067      unexpected tokens following preprocessor directive - expected a newline      windows.h            

Error      C2061      syntax error: identifier 'LPCSTR'      
Error      C2061      syntax error: identifier 'BYTE'      

I can't figure out why this is happening. Anyone have an idea?
TheIronDukeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Sam Simon NasserIT Support ProfessionalCommented:
you need to put
#include <windows.h>

Open in new window

in the top of the source file, do you have it?

also, run these commands, what are the output of them?
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>set INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>set LIB
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>set LIBPATH

Open in new window

0
TheIronDukeAuthor Commented:
Yes, I do have #include <windows.h> at the top of the source file. In fact it is throwing errors on the Windows.h file like C4067 above.

I'm not sure what you mean by "running" those commands.

If you mean on the projects property pages

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC

 is already set as the defaults on the VC++ Directories page for Include directories, Library Directories.
0
ambienceCommented:
Probably some missing SDK's like Platform SDK for Windows etc. Can you make sure the setup is identical on both machines?  Comparing the installation folders can help figure out differences.
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
TheIronDukeAuthor Commented:
Yes I double checked it. The project uses SDK 8.1, on both computers. I reinstalled 8.1 on this computer just to be sure. It is all there.

The problem seems to be centered on windows.h not recognizing the standard data types, like LPWSTR, etc. The compiler throws error on windows.h itself, and any other file that uses those data type saying they are "unidentified":

Error      C2061      syntax error: identifier 'BYTE'

This simply does not make sense to me. I tried running the VS 2015 installer again, selecting "Repair". No change.
0
TheIronDukeAuthor Commented:
My Mistake ambience. A corrupt Windows SDK 8.1 was the problem. Running great now. 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.