Nice programing

corecrt.h를 찾을 수 없음 : $ (UniversalCRT_IncludePath)가 잘못되었습니다.

nicepro 2021. 1. 9. 11:38
반응형

corecrt.h를 찾을 수 없음 : $ (UniversalCRT_IncludePath)가 잘못되었습니다.


Windows 10이 설치된 랩톱에 Visual Studio 2015를 설치했습니다.

항상 Windows 10을 사용하는 다른 PC에서 동일한 버전의 Visual Studio (업데이트 3)로 만든 솔루션으로 리포지토리를 복제했습니다.

랩톱에서 솔루션을 빌드하려고하면 다음 오류가 발생합니다.

c:\program files (x86)\microsoft visual studio 14.0\vc\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory

에서 이 페이지 내가 추가해야합니다 읽었습니다 $(UniversalCRT_IncludePath)경로를 포함 내에 있지만,이 경우에도 나는이 같은 오류를 얻을 수 있습니다.

$(UniversalCRT_IncludePath)이 경로를 확인하고 참조합니다.

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt

이 경로는 내 노트북에 없습니다. 대신 나는 이것을 가지고 있습니다.

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt

그래서 윈도우 버전이 다른 것 같습니다. 아마도 이것은 사실입니다. 왜냐하면 내 랩톱에서는 1511 윈도우를 업그레이드하지 않았고 다른 PC에서는 모두 올바르게 설치 되었기 때문입니다.

내 질문은 corecrt.h경로를 엉망으로 만들지 않고 두 PC에서 파일을 어떻게 참조 할 수 있습니까? 이 경로는 PC에 의존하기 때문에 하드 링크를 피하고 싶습니다. 그리고 나는 그것이 시스템에 의존하고 솔루션에 케이블로 연결되지 않아야한다는 점을 고려할 때 랩톱에서 경로가 잘못된 이유를 이해할 수 없습니다.

이 문제를 어떻게 해결할 수 있습니까? 랩톱을 동일한 Windows 버전으로 업데이트 할 수 있다는 것을 알고 있지만 여러 가지 이유로이를 피하고 싶습니다.

-- 편집하다

이 경로가 있음을 알았습니다.

C:\Program Files (x86)\Windows Kits\8.1\Include\10.0.10240.0\ucrt

동일한 10.0.10240.0버전이지만 다른 Windows 키트 버전과 관련되어 있으므로이 경우 문제가있을 수 있습니다. 내 랩톱에는 Visual Studio 2013도 있으므로 Visual Studio 2013에서 가져올 수 있지만 Visual Studio 2013으로 다른 프로젝트를 유지 관리하고 있고 아직 제거 할 수 없기 때문에 제거 할 수 없습니다.

Visual Studio 2015 폴더 $(UniversalCRT_IncludePath)에서 일부 .bat 파일 (vcvarsall.bat 또는 유사)에서 명시 적으로 설정할 수 있지만 어떤 파일과 위치를 알 수 없습니다.


Visual Studio 2017의 경우 다음을 수행해야했습니다.

  1. Visual Studio 설치 관리자를 실행합니다.
  2. 수정 버튼을 선택합니다.
  3. "개별 구성 요소"탭으로 이동합니다.
  4. "컴파일러, 빌드 도구 및 런타임"까지 아래로 스크롤하십시오.
  5. "Windows Universal CRT SDK"를 선택합니다.
  6. 설치.

이 문제를 이미 고쳤을 수도 있지만 다른 사람이 오면 여기 팁을 따라이 문제를 해결했습니다 .

기본적으로 다음 시스템 환경 변수를 설정합니다.

INCLUDE="C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"
LIB="C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64"

아마 훨씬 더 나은 모범 사례 방법이있을 것입니다.하지만 초고속으로 고치는 것만으로는 훌륭했습니다.


나는 같은 문제가 있었다. 나는 여기서 답을 시도했다. 100 % 작동하지 않았습니다. 내가 찾은 것은 VC ++ 2015 도구 세트 (x86, x64)가 2017 Community Edition (지금 사용하고 있음)에 필요하지만 include 또는 lib 링크를 추가하지 않고 있다는 것입니다.

친애하는.


프로젝트 속성 (메뉴 프로젝트> 속성)을 확인하십시오. 구성 속성> 일반에서 플랫폼 도구 집합 및 Windows SDK 버전 을 확인합니다 ( 플랫폼 도구 집합> VS2015를 사용하는 경우). 플랫폼 도구 집합 = VS2017 및 Windows SDK 버전 = 10.xx를 설정 한 후 저에게 효과적이었습니다.


Visual Studio를 설치하는 동안 누락 된 것이있을 수 있습니다. VC ++ 도구 세트를 선택하는 것을 잊었는지 여부를 확인할 수 있습니다.

  1. Control Panel-> All Control Panel Items-> Programs and Features->Visual studio 2015
  2. 딸깍 하는 소리 change/uninstall
  3. 선택 VC++2015 toolset(x86,x64)하고 설치하십시오.

Visual Studio Community 2017 RC (15.0.26206.0)의 경우 선택적 도구의 이름은 VC++ 2017 v141 toolset(x86,x64)다음과 같습니다.

`VC ++ 2017 v141 도구 세트 (x86, x64)


나를 위해 Visual Studio에서이 설정을 도와줍니다.

  • 프로젝트 속성-> VC ++ 디렉토리-> 디렉토리 포함-> 편집을 위해 엽니 다.
  • 체크 박스 부모 또는 프로젝트 기본값에서 상속

의 경우 Visual Studio 2015 Enterpriseparsley72와 비슷한 방식으로 문제를 해결했습니다.

1. Run the Visual Studio Installer;
2. Select Modify button;
3. Go to "Windows and Web Development";
4. Tick "Universal Windows App Development Tools";
5. Install.

Windows에서 PyTorch를 컴파일하고 Windows Universal CRT SDK를 설치하는 동안이 오류가 발생했습니다. 주위를 둘러 보면 두 가지 원인이있는 것 같습니다.

  1. vcvarsall.bat를 실행해야합니다. VS2017 x64 기본 명령 프롬프트를 시작하면이 bat 파일이 실행됩니다.
  2. Set vcvars_ver to correct version that is on your machine. To find the version you have, go to %PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\. Inside this folder you will see folder such as 14.13.26128. So you set vcvars_ver to 14.13.

Below fragment in my batch file shows above two steps:

set "VS150COMNTOOLS=%PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build"
call "%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.13

The reason of error could possibly could be because you don't have the updated version of windows 10 sdk

you can also download and install window 10 sdk autonomously,

using this link windows 10 sdk, and add it into your system path

hope it helps.


The Windows SDK you have selected in your project isn't installed.

Visual Studio 프로젝트 설정 Windows SDK 버전 8.1

Either install the SDK you want or select one of installed ones (note: selecting <inherit from parent> option will default to 8.1, which isn't installed by default in VS 2017+)

To install the Windows SDK, run the installer and go to Individual components and scroll to the very bottom:

Visual Studio 설치 관리자-개별 구성 요소-Windows 8.1 SDK


Either add the older Windows SDK (ex. version 8.1 / Universal) to your machine (as described by parsley72), or re-target Project(s) to use one of the Windows SDK(s) installed on your computer.

I just ran into this with VS2017 and re-targeting worked. Though I'm still waiting for an answer on whether targeting a newer Windows SDK version has any ill effects.


I have no experience with VC++ but I have to build ta-lib for a python project. Since I do not want to touch anything in VC Studio but I have experienced with regular C programming under Unix, I have taken the approach of adding the include path directly in the Makefile; e.g.:

INCPATH = -I"..........\include" -I"..........\src\ta_common" -I"..........\src\ta_abstract" -I"..........\src\ta_abstract\tables" -I"..........\src\ta_abstract\frames" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"

There are multiple Makefiles under sub-directories so I have had to make changes to each one but it works alright for me.


I resolve this error by the next 3 step.

1) All file from:

C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x86
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86

Copy to:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\lib\x86

2) 다음의 모든 파일 :

C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64

에게 복사:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\lib\x64

3) 모든 파일 :

C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt

에게 복사:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\include

그런 다음 프로젝트를 다시 빌드하고 모두 제대로 작동합니다.


Windows 10 sdk를 다시 설치하십시오 .Windows sdk가 없거나 내용이 변경되면이 오류가 팝업됩니다 .wdk를 설치 한 후 나에게 발생했습니다.

참조 URL : https://stackoverflow.com/questions/38290169/cannot-find-corecrt-h-universalcrt-includepath-is-wrong

반응형