繁体   English   中英

Visual Studio 14.0和Windows Kits中的错误包括文件夹

[英]Errors in Visual Studio 14.0 and Windows Kits Include Folders

我试图在Visual Studio Community 2015中构建一个默认的DirectX 11项目,导致在cmath,corecrt.h,cstdio,cstdlib,cstring,cwchar等中发生了2000多个错误。

当我尝试构建时,这是我收到的错误列表:

1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(28): error C2371: 'crtGlob_t': redefinition; different basic types
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(28): note: see declaration of 'crtGlob_t'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(43): error C2371: '_LDOUBLE': redefinition; different basic types
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(43): note: see declaration of '_LDOUBLE'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(47): error C2371: '_LDBL12': redefinition; different basic types
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(47): note: see declaration of '_LDBL12'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(51): error C2011: '_FloatOutStruct': 'struct' type redefinition
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(51): note: see declaration of '_FloatOutStruct'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(65): error C2365: 'INTRNCVT_OK': redefinition; previous definition was 'enumerator'
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(65): note: see declaration of 'INTRNCVT_OK'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(66): error C2365: 'INTRNCVT_OVERFLOW': redefinition; previous definition was 'enumerator'
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(66): note: see declaration of 'INTRNCVT_OVERFLOW'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(68): error C2365: 'INTRNCVT_UNDERFLOW': redefinition; previous definition was 'enumerator'
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(68): note: see declaration of 'INTRNCVT_UNDERFLOW'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(68): error C2371: 'INTRNCVT_STATUS': redefinition; different basic types
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(68): note: see declaration of 'INTRNCVT_STATUS'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(70): error C2011: '_strflt': 'struct' type redefinition
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\corecrt.h(70): note: see declaration of '_strflt'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(54): error C2146: syntax error: missing ';' before identifier '_CRTALLOCATOR'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(61): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(61): error C2086: 'int _ACRTIMP': redefinition
1>  c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(54): note: see declaration of '_ACRTIMP'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(61): error C2146: syntax error: missing ';' before identifier '_CRT_JIT_INTRINSIC'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(68): error C2144: syntax error: 'int' should be preceded by ';'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(68): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(68): error C2086: 'int _ACRTIMP': redefinition
1>  c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(54): note: see declaration of '_ACRTIMP'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(74): error C2086: 'int _ACRTIMP': redefinition
1>  c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(54): note: see declaration of '_ACRTIMP'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(74): error C2146: syntax error: missing ';' before identifier '_CRTALLOCATOR'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(80): error C2144: syntax error: 'void' should be preceded by ';'
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_malloc.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped    ==========

还有其他人遇到过这个问题吗?

PS我正在使用Windows 10 64位。

我设法通过将$(UniversalCRT_IncludePath)添加到我项目的其他包含目录来修复它。

暂无
暂无

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

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