简体   繁体   English

Visual Studio Build Tools 14 找不到 stdio.h

[英]Visual Studio Build Tools 14 cannot find stdio.h

Ayo,哎哟,

Now I have attempted other solutions to the problem that over people have had success in. But unfortunately, technology is not on my side today.现在我尝试了其他解决方案来解决人们已经成功解决的问题。但不幸的是,今天技术并不站在我这边。

As the title says my C++ compiler says it cannot find 'stdio.h' then leaves with error status 3, Here is the stacktrace https://gyazo.com/d26d47054ee30f7e03524b7d8c0052a8正如标题所说,我的 C++ 编译器说它找不到“stdio.h”,然后以错误状态 3 离开,这是堆栈跟踪https://gyazo.com/d26d47054ee30f7e03524b7d8c0052a8

How would I be able to resolve this?我将如何解决这个问题?

Thanks, Duke.谢谢,杜克。

Running C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat worked for me.运行 C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat 对我有用。 See details on MSDN .请参阅MSDN 上的详细信息。

Microsoft now implements C run time library as a "Universal CRT", which is part of the OS. Microsoft 现在将 C 运行时库实现为“通用 CRT”,它是操作系统的一部分。 And to develop for it, you will need the SDK for the OS, aka Windows SDK.为了开发它,你需要操作系统的 SDK,也就是 Windows SDK。

CRT Library Features (Microsoft Docs) CRT 库功能 (Microsoft Docs)

However, there's a not-so-obvious component of the SDK installation that will install the minimum needed SDK CRT components (ca. 700MB).但是,SDK 安装中有一个不太明显的组件,它将安装所需的最小 SDK CRT 组件(大约 700MB)。

It is called, appropriately, Windows Universal CRT SDK .它被恰当地称为Windows Universal CRT SDK

You can select it by installing the Build Tools component , which will in turn install the VS Installer.您可以通过安装Build Tools 组件来选择它,该组件将依次安装 VS 安装程序。 Then you modify the Build Tools to include the individual SDK component.然后修改构建工具以包含单个 SDK 组件。

Visaul Studio 安装程序组件选择窗口

But you won't get far with this, unless you can scam Windows into running an app that doesn't depend on its' kernel, implying you will most likely need the full Windows SDK for the kernel32 library and its' dependencies.但是你不会走得太远,除非你可以欺骗 Windows 运行一个不依赖其内核的应用程序,这意味着你很可能需要完整的 Windows SDK 来支持 kernel32 库及其依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM