Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 916
Florian Avatar asked Nov 13 '22 23:11

Florian


1 Answers

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.

like image 69
Gerardo Hernandez Avatar answered Jan 09 '23 16:01

Gerardo Hernandez