致命错误 C1083:无法打开包含文件:“excpt.h”和“ctype.h”

Posted

技术标签:

【中文标题】致命错误 C1083:无法打开包含文件:“excpt.h”和“ctype.h”【英文标题】:fatal error C1083: Cannot open include file: 'excpt.h' and 'ctype.h' 【发布时间】:2016-04-15 07:50:09 【问题描述】:

我正在尝试构建 TortoiseSVN,当我运行 nant 设置时,我收到了这些构建错误,我不确定如何解决它们。 SO上有类似的帖子,但它们已经过时或不适用于我的情况。最终,我将需要使用 Visual Studio 2015 来构建项目。

这是日志中的构建错误:

[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\dir.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filepath.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filestat.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\network_io\unix\sockaddr.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\atomic\win32\apr_atomic.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\locks\win32\proc_mutex.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\encoding\apr_escape.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h(160) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filesys.c)

[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\dir.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\locks\win32\proc_mutex.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filepath.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filestat.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\network_io\unix\sockaddr.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\atomic\win32\apr_atomic.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\file_io\win32\filesys.c)
[build cl] C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory (compiling source file C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\encoding\apr_escape.c)

【问题讨论】:

Cannot open include file: 'ctype.h': No such file or directory的可能重复 【参考方案1】:

我在这里看到了头文件:

C:\Program Files (x86)\Windows Kits\8.1\Include\km\crt\excpt.h

所以将路径C:\Program Files (x86)\Windows Kits\8.1\Include\km\crt\添加到项目属性中搜索包含文件。

如果您使用 Win10 SDK(适用于版本 1511),它位于此处:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\km\crt\excpt.h

【讨论】:

好的,我让它工作了,但问题是现在它找不到 ctype.h。你有那个文件吗? 是的,在相同的 CRT 文件夹中:“C:\Program Files (x86)\Windows Kits\8.1\Include\km\crt\ctype.h” “C:\Program Files (x86) \Windows 工具包\10\Include\10.0.10586.0\ucrt\ctype.h" 嗯好吧,我的有点不同,但我确实找到了 ctype.h。现在当你说,添加路径来搜索包含文件,你是什么意思?在哪里?顺便说一句,我在 Windows Kits\8.1 下找不到路径...只有 Windows Kits\10 这里解释了我对 INCLUDE 设置的含义:msdn.microsoft.com/en-us/library/ee855621.aspx 好的,谢谢。我在 VC++ 目录下添加了 INCLUDE 和 EXE 目录的路径,但同样的错误嗯……我可以用不同的方式添加路径吗?可能是因为我在一个解决方案下有多个项目?顺便说一句,感谢您的帮助!

以上是关于致命错误 C1083:无法打开包含文件:“excpt.h”和“ctype.h”的主要内容,如果未能解决你的问题,请参考以下文章

致命错误 C1083:无法打开包含文件:'atlbase.h' Pyinsane 包 [重复]

VC6:致命错误 C1083:无法打开包含文件:“stdint.h”

收到“致命错误 C1083:无法打开包含文件:'gxall.h':没有这样的文件或目录”[重复]

致命错误 C1083:无法打开包含文件:'boost/regex.hpp':没有这样的文件或目录

无法在 Windows 中安装 pycocotools:致命错误 C1083:无法打开包含文件:'io.h':没有此类文件或目录错误:

致命错误 C1083:无法打开包含文件:'boost/config.hpp':没有这样的文件或目录