TheIronDuke
asked on
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?
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?
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
ASKER
My Mistake ambience. A corrupt Windows SDK 8.1 was the problem. Running great now. Thanks.
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?
Open in new window