Florian
Florian

Reputation: 5994

Visual Studio 2012 no C-Header installed?

I have installed VisualStudio 2012 and was working for about 2 weeks with it. But now I wanted to start a C++ project (i am c# programmer usually) and I wrote some simple code. After that I wanted to compile it and I got lots of errors... there are no standart c-header files.

What I ve done: Created a new Win32 Project (empty project) Created code with these includes:

#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>

Windows.h is found the rest not. Does anyone has an idea? I also had look at the IncludeDirectories:

$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSDK_IncludePath)

Thats all. Does anyone has an idea?

Upvotes: 5

Views: 3411

Answers (2)

Gerardo Hernandez
Gerardo Hernandez

Reputation: 2059

Probably you found this known issue: https://connect.microsoft.com/VisualStudio/feedback/details/774158/re-installed-visual-studio-2010-and-c-standard-headers-are-missing If you install Visual Studio 2012 importing settings from Visual Studio 2010, and then uninstall it and reinstall it, the C++ standard headers are gone.

There is a solution that worked for me, proposed by Jeff at: https://social.msdn.microsoft.com/Forums/vstudio/en-US/a987f4fa-676f-4fda-ab69-2c6bcc2684c3/visual-studio-c-2012-standard-header-files-are-missing?forum=vssetup

which entails modifying a copy of vc_librarycore.msi with orca, and then running it. That will install part of the VC folder, where the include files are (Note that modifying the original vc_librarycore.msi directly as the answer suggests did not work, probably because of permissions, so I copied the whole vc_librarycore folder to a different directory). Also note that the UUIDs used in the answer may change according to the updates applied to Visual Studio 2012.

Upvotes: 1

bossbarber
bossbarber

Reputation: 890

There must be something wrong with your installation, and I would recommend re-installing. I am able to use these includes just fine in my version of VS2012. Is this the Express version of Visual Studio? If so, you may need to also install the Windows Platform SDK as well.

Upvotes: 0

Related Questions