Visual Studio 2010无法打开VC ++包含文件

时间:2022-06-19 22:25:17

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:

在这里真的遇到了Visual Studio问题。重新安装后,我从Visual Studio中收到一堆错误,关于它无法找到VC ++库:

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

错误1错误C1083:无法打开包含文件:'stdlib.h':没有这样的文件或目录

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

错误2错误C1083:无法打开包含文件:'sys / types.h':没有这样的文件或目录

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

错误3错误C1083:无法打开包含文件:'stdio.h':没有这样的文件或目录

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

错误4错误C1083:无法打开包含文件:'stdlib.h':没有这样的文件或目录

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

错误5错误C1083:无法打开包含文件:sys / types.h':没有这样的文件或目录

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?

我有什么想法可以解决这个问题?我刚刚在C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC中搜索了stdlib.h,但我没有找到任何内容。什么会重新填充我的图书馆?

2 个解决方案

#1


0  

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.

它是一个肮脏的解决方案,但它的工作原理:将这些文件复制到另一台计算机上,并在这个版本的Visual Studio上使用这些文件似乎已经有效了。

#2


0  

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.

由于我的计算机上有三个版本的VS,因此我决定检查所有版本是否在其安装文件夹中都有此文件。我发现VS 2010(VC 10.0)没有,但我在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.

我在VS 2012(VC 11.0)中打开了我的项目。 VS 2012促使我将项目从旧版本的VS“更新”到新版本。我点击确定。更新成功。然后我编译了我的项目。错误消失了。

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.

我很想知道stdio.h是否确实存在于VS 2012的安装位置。事实上它确实存在于:C:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ VC \ crt \ src \ stdio.h。因此,似乎在安装多个版本的VS时,我的stdio.h文件以某种方式从我的旧版VS 2010安装中消失了。但是,我不太确定这个理论。

#1


0  

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.

它是一个肮脏的解决方案,但它的工作原理:将这些文件复制到另一台计算机上,并在这个版本的Visual Studio上使用这些文件似乎已经有效了。

#2


0  

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.

由于我的计算机上有三个版本的VS,因此我决定检查所有版本是否在其安装文件夹中都有此文件。我发现VS 2010(VC 10.0)没有,但我在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.

我在VS 2012(VC 11.0)中打开了我的项目。 VS 2012促使我将项目从旧版本的VS“更新”到新版本。我点击确定。更新成功。然后我编译了我的项目。错误消失了。

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.

我很想知道stdio.h是否确实存在于VS 2012的安装位置。事实上它确实存在于:C:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ VC \ crt \ src \ stdio.h。因此,似乎在安装多个版本的VS时,我的stdio.h文件以某种方式从我的旧版VS 2010安装中消失了。但是,我不太确定这个理论。