C++ 无法打开包含文件:'ctype.h':没有这样的文件或目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42258311/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 15:29:17  来源:igfitidea点击:

Cannot open include file: 'ctype.h': No such file or directory

c++visual-studiovisual-studio-2015

提问by M.Hamza Al Omari

I installed c++ package on VS 2015 , if I tried to build the project ,the following problem appears :

我在 VS 2015 上安装了 c++ 包,如果我尝试构建项目,则会出现以下问题:

C1083 Cannot open include file: 'ctype.h': No such file or directory Win32Project5 c:\program files (x86)\windows kits\8.1\include\um\winnt.h 31

C1083 无法打开包含文件:'ctype.h':没有那个文件或目录 Win32Project5 c:\program files (x86)\windows kits\8.1\include\um\winnt.h 31

Any possible solution ....

任何可能的解决方案......

回答by Ynon

Repair / Reinstall visual studio. Make sure that the Windows SDK option (Probably 8.1 in your case) is ticked, As you can see in this picture: enter image description here

修复/重新安装视觉工作室。确保勾选了 Windows SDK 选项(在您的情况下可能是 8.1),如下图所示: 在此处输入图片说明

回答by Michael Haephrati

To add the missing component, go to Control Panel-> Uninstall a Program, and select to Change the installation of Visual Studio. Then, here is the option you need to check: enter image description hereThen press "Modify".

要添加缺少的组件,请转到Control Panel-> Uninstall a Program,然后选择更改 Visual Studio 的安装。然后,这是您需要检查的选项: 在此处输入图片说明然后按“修改”。

Also don't forget to update the project's Properties to be using Windows SDK version 10.0.17134.0. enter image description here

另外不要忘记更新项目的属性以使用 Windows SDK 版本 10.0.17134.0。 在此处输入图片说明

回答by ej8000

Right click on your solution or project in the solution explorer & Retarget your solution or project to the installed SDK version

在解决方案资源管理器中右键单击您的解决方案或项目并将您的解决方案或项目重定向到已安装的 SDK 版本

回答by Vlad Bezden

Here is mine VS 2017 build tools configuration to make Python 3.7 and up to compile on my local machine and fix. Please notice that MS changed VS Studio Build Tools interface

这是我的 VS 2017 构建工具配置,用于使 Python 3.7 及更高版本在我的本地机器上编译并修复。请注意 MS 更改了 VS Studio Build Tools 界面

VS Build Tool 2017 configuration for pyodbc compilation

pyodbc编译的VS Build Tool 2017配置

In order to make code to compile you also MUST to install ODBC driver

为了使代码编译,您还必须安装ODBC 驱动程序

You can download VS 2017 Build tools from: https://visualstudio.microsoft.com/downloads/

您可以从以下位置下载 VS 2017 构建工具:https: //visualstudio.microsoft.com/downloads/

VS Build Tool 2017 download

VS 构建工具 2017 下载