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

fatal error C1083: Cannot open include file: 'excpt.h' and 'ctype.h'

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

这是日志中的构建错误:

[build cl] C:\Program Files (x86)\Windows Kits.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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)

我在这里看到头文件:

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

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

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

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