gpt4 book ai didi

c++ - Visual Studio 14.0 和 Windows 工具包中的错误包括文件夹

转载 作者:太空宇宙 更新时间:2023-11-04 13:15:34 25 4
gpt4 key购买 nike

我尝试在 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 ==========

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

附言我使用的是 Windows 10 64 位。

最佳答案

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

关于c++ - Visual Studio 14.0 和 Windows 工具包中的错误包括文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37545268/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com