1
votes

really struggling with a Visual Studio issue here. I get a bunch of errors from Visual Studio after having re-installed it, about it not being able to find VC++ libraries:

Error 1 error C1083: Cannot open include file: 'stdlib.h': No such file or directory

Error 2 error C1083: Cannot open include file: 'sys/types.h': No such file or directory

Error 3 error C1083: Cannot open include file: 'stdio.h': No such file or directory

Error 4 error C1083: Cannot open include file: 'stdlib.h': No such file or directory

Error 5 error C1083: Cannot open include file: sys/types.h': No such file or directory

Any ideas how I can resolve this issue? I just did a search for stdlib.h in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC and I didn't find anything. What will repopulate my libraries?

2
I had a similar problem with vs2012. Mystically, installing a later update / service pack helped and brought them back. Did you install any version of vs2012 by chance? - Tobias Langner
Yes, I installed Visual Studio 2012 on this box, and then I went and re-installed Visual Studio 2010 on it! - Alexandru
Unfortunately, I have all the latest service packs :( - Alexandru
I'll try copying these files over from another computer, but I wonder if this will cause any problems for me...and if anything else went wrong during the installation of VS2010. - Alexandru
In general I know it's not recommended to install VS2010 after installing VS2012... That could be part of the problem. - Nathan Monteleone

2 Answers

0
votes

Its a dirty solution, but it works: Copying these files over from another computer with these files on it for this version of Visual Studio seems to have worked.

0
votes

The exact error I received was:

error C1083: Cannot Open include file <stdio.h>

Since I had three versions of VS on my computer, I decided to check whether all versions had this file in their install folders. I discovered that VS 2010 (VC 10.0) did not, and yet I had opened my project in VS 2010.

I opened my project in VS 2012 (VC 11.0). VS 2012 prompted me to "update" the project from an older version of VS to a newer one. I clicked OK. The update was successful. I then compiled my project. And the error was gone.

I was curious to find out if stdio.h actually existed in the install location for VS 2012. And indeed it did at: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\stdio.h. Thus, it appears that upon installing multiple versions of VS, my stdio.h file somehow vanished from my older VS 2010 installation. Am not quite sure about this theory, though.