2017-03-14 31 views
15

Tôi vừa nâng cấp lên Visual Studio 2017 Community Edition và gặp sự cố khi tải tệp tiêu đề chuẩn. Tôi nhận được 507 lỗi từ các tệp tiêu đề khác nhau. Dưới đây là một số đoạn:Lỗi Visual Studio 2017 trên tiêu đề chuẩn

Một số lỗi:

Severity Code Description Project File Line Suppression State 
Error (active) E1696 cannot open source file "errno.h" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cerrno 7 
Error (active) E1696 cannot open source file "float.h" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cfloat 7 
Error (active) E0282 the global scope has no "acosf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 629 
Error (active) E0282 the global scope has no "asinf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 629 
Error (active) E0282 the global scope has no "atanf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 630 
Error (active) E0282 the global scope has no "atan2f" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 630 
Error (active) E0282 the global scope has no "ceilf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 630 
Error (active) E0282 the global scope has no "cosf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 631 
Error (active) E0282 the global scope has no "coshf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cmath 631 
Error (active) E0282 the global scope has no "swprintf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 21 
Error (active) E0282 the global scope has no "swscanf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 21 
Error (active) E0282 the global scope has no "ungetwc" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 21 
Error (active) E0282 the global scope has no "vfwprintf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 22 
Error (active) E0282 the global scope has no "vswprintf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 22 
Error (active) E0282 the global scope has no "vwprintf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 22 
Error (active) E0282 the global scope has no "wcrtomb" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 23 
Error (active) E0282 the global scope has no "wprintf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 23 
Error (active) E0282 the global scope has no "wscanf" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 23 
Error (active) E0282 the global scope has no "wcsrtombs" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 24 
Error (active) E0282 the global scope has no "wcstol" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 24 
Error (active) E0282 the global scope has no "wcscat" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 24 
Error (active) E0282 the global scope has no "wcschr" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 25 
Error (active) E0282 the global scope has no "wcscmp" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 25 
Error (active) E0282 the global scope has no "wcscoll" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 25 
Error (active) E0282 the global scope has no "wcscpy" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 26 
Error (active) E0282 the global scope has no "wcscspn" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 26 
Error (active) E0282 the global scope has no "wcslen" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 26 
Error (active) E0282 the global scope has no "wcsncat" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 27 
Error (active) E0282 the global scope has no "wcsncmp" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 27 
Error (active) E0282 the global scope has no "wcsncpy" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 27 
Error (active) E0282 the global scope has no "wcspbrk" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\cwchar 28 
Error (active) E0282 the global scope has no "wcsrchr" RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools 
Error (active) E0260 explicit type is missing ('int' assumed) RPGWorld c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\xtgmath.h 212 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\Glsl.inl 40 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\Texture.hpp 159 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\VertexArray.hpp 64 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\VertexArray.hpp 72 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\VertexArray.hpp 88 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\VertexArray.hpp 104 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\Graphics\VertexArray.hpp 129 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 58 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 332 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 345 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 365 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 387 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 387 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 399 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 413 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 413 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 427 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 427 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 456 
Error (active) E0757 variable "size_t" is not a type name RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\packages\sfml-system.2.4.0.0\build\native\include\SFML\System\String.hpp 456 
Error (active) E0020 identifier "rand" is undefined RPGWorld c:\Users\Fazil\Documents\Visual Studio 2017\Projects\Local\RPGWorld\RPGWorld\Blocks.cpp 23 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory RPGWorld c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\include\crtdefs.h 10 

Tôi chưa bao giờ có vấn đề này với Visual Studio 2015 Community Edition. Tôi có thiếu một số thành phần từ trình cài đặt? Bất kỳ trợ giúp sẽ được đánh giá cao. Cảm ơn bạn!

Trả lời

26

Tôi đã có lỗi để biến mất bằng cách cài đặt thành phần Windows Universal CRT SDK, bổ sung hỗ trợ cho Windows SDK cũ. Bạn có thể cài đặt này bằng cách sử dụng Studio Installer trực quan:

enter image description here

Nếu vấn đề vẫn còn, bạn nên thay đổi SDK Target trong Visual Studio dự án: kiểm tra xem các phiên bản Windows SDK là 10.0.15063.0.

Trong: Dự án -> thuộc tính thử nghiệm -> Chung -> Phiên bản SDK của Windows -> chọn 10.0.15053.0.

Sau đó, tệp errno.h và các tệp chuẩn khác sẽ được tìm thấy và nó sẽ biên dịch.

+4

Ý tôi là, tại sao một nửa không phá vỡ thư viện chuẩn trong Win10SDK? Cảm ơn bạn đã tìm ra điều này! – schulmaster

+2

Tôi muốn nói rằng liên kết này cũng giúp tôi khắc phục sự cố. https://stackoverflow.com/questions/43410631/visual-studio-2017-cant-find-windows-h – CraftedGaming

7

Nếu sự cố không được giải quyết bằng câu trả lời ở trên, hãy kiểm tra xem phiên bản Windows SDK có phải là 10.0.15063.0 hay không.

Dự án - tính chất thử nghiệm> -> General -> Windows Phiên bản SDK -> chọn 10.0.15053.0

Sau này xây dựng lại các giải pháp.

+1

Vì một số lý do, điều này là cần thiết. Trong trường hợp của tôi, SDK 8.1 đã được chọn. Khi thay đổi thành 10.0.15063.0 nó hoạt động. – ferosekhanj

0

Tôi đã gặp vấn đề tương tự. Trong trường hợp của tôi, nguyên nhân là các dự án đã được tạo ra trong một máy khác, sử dụng một bản phát hành khác của Visual Studio 2017.

Các vấn đề liên quan