Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] UniversalCRT include/library directories missing on project settings

So opening the project in Visual Studio 2015 constantly gives an error that the project was not able to compile due to corecrt.h file not being found. This also happens when I try to compile UE4 project.

After some research, I found a way to fix the issue. I have to select the project in the Solution Explorer, then go to Project > Properties > VC++ Directories and add the following paths to Include Directories and Library Directories respectively:


After doing this, right-click the project and select "Clean" and then "Build".

After doing the steps above, everything builds and runs perfectly.

Here's the Microsoft announcement about these changes:


My questions is if I'm missing some package when I installed Visual Studio 2015 or is UnrealEngine missing these include/library paths once it's created?

Important note: I'm using Windows 10 and I don't have any previous version of Visual Studio on my system.

Product Version: UE 4.10 Preview
more ▼

asked Oct 21 '15 at 03:19 AM in Installation & Setup

avatar image

108 4 8 14

avatar image quinx Oct 21 '15 at 04:26 AM

This also affects Hot Reloading, which gives the same compiler error but I was unable to figure out how to get the include and lib path into the Unreal Build Tool,

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Feb 15 '17 at 10:24 PM by Stephen Ellis for the following reason:

The question is answered, right answer was accepted

3 answers: sort voted first

After a long time trying to figure this out I found that the main reason of this bug. It is because I had Windows Driver Kit installed.

It is/was a known bug in vcvarsqueryregistry.bat and apparently Unreal Build Tool is using the same logic.

With Windows Driver Kit installed, the include and lib directories of Windows Kits had more than one directory inside (wdf + a bunch of others) in C:\Program Files (x86)\Windows Kits\10\include AND C:\Program Files (x86)\Windows Kits\10\Lib and Unreal Build Tool was using the wrong directory.

To solve this issue, I just uninstalled Windows Driver Kit and now everything works. I suggest, though, a fix in the logic of Unreal Build Tool in case someone has the same problem I had and cannot uninstall Windows Driver Kit.

more ▼

answered Oct 24 '15 at 05:22 AM

avatar image

108 4 8 14

avatar image Tim C ♦♦ STAFF Oct 26 '15 at 09:02 PM

Hi quinx,

Thank you for the additional investigation that you performed for this issue. I am not sure I would have made the connection with Windows Driver Kit since I don't have that installed. I have entered a ticket to have this situation investigated further (UE-22632).


avatar image Ravlek STAFF Oct 28 '15 at 03:10 PM

Hi quinx,

I am looking at this issue and you have provided references to code in our Main branch which is not part of the 4.10 branch and the preview. Are you pulling Master directly? Or did this happen from 4.10 pull?


avatar image quinx Oct 28 '15 at 03:56 PM


This was from Master directly. But I believe that I saw the same problem happening on 4.10 preview 2, but can't confirm right now.

avatar image Ravlek STAFF Oct 28 '15 at 05:40 PM

After installing WDK, I am also seeing issues when trying to build. I'll see if I can figure out where it is coming from and get a fix for 4.10.


avatar image Ravlek STAFF Oct 28 '15 at 10:15 PM

Ok, so unfortunately, we won't be able to get a fix for 4.10 because we are still calling the vcvars.bat to generate the environment variables and trying to change that at this late of a date is just not feasible. I am working on a fix for master and 4.11 where we are trying to remove the need for that in the first place.


avatar image danjo133 Mar 12 '16 at 11:06 AM

Have you been able to fix this for 4.11?

avatar image Tim C ♦♦ STAFF Mar 15 '16 at 06:34 PM

Hi danjo133,

I took a look at this issue again, and we believe we have this corrected internally. The correction should have made it into 4.11.


avatar image pragmascript Apr 26 '16 at 06:10 PM

I still have this issue (promoted branch)

avatar image Fuzzycode Jun 24 '16 at 12:37 PM

Just integrated 4.11.2 and hit this issue. I've had a combination of WDK and SDK versions installed, after removing the WDK it still cannot find corecrt.h

Update: So I've had to explicitly do a rebuild on the project for this to work, despite not having built the code before. A clean then build on the project does not have the same effect as a rebuild :(

Cheers, Stace

avatar image Saphirant Sep 10 '16 at 12:40 PM

Im using UnrealEngine 4.12.5 and i have this issue, i removed WDK but still get the error (even after rebuild in VS), but i notice i had 3 version of SDK: 10.0.10586.212, 10.0.14393.33, 10.0.26624. Should i remove the older version? (Im on Windows 10, version 1607, and i have same error as quinx).

avatar image Tim C ♦♦ STAFF Sep 20 '16 at 06:42 PM

Hi Saphirant,

There should be no problem with removing the older versions of the SDK, but there should also be no problem with leaving them there. Could you please try deleting the Intermediate folder in your Engine source code, then run GenerateProjectFiles.bat and build the Engine again?


avatar image Saphirant Sep 20 '16 at 07:00 PM


I can't find where is GenerateProjectFiles.bat. Maybe its because i have the launcher installation. What should i do?

avatar image Tim C ♦♦ STAFF Sep 20 '16 at 07:10 PM

If you are using the binary version of the Engine installed through the Launcher, then you would want to go to the Library portion of the Unreal Engine tab in the Launcher. Click on the small down-arrow for the card showing your current Engine installation and select the Verify option. This will replace any missing files, including the ones you removed by deleting the Intermediate folder.



verify.png (9.7 kB)
avatar image Saphirant Sep 20 '16 at 08:10 PM

After Verify my engine, i still have this error. But i found a temporary solution, i use the rebuild.bat, then with UnrealFrontend, i launch my project. Is there a way to use the rebuild.bat directly in UE4? (the full rebuild option is check)

avatar image Tim C ♦♦ STAFF Sep 22 '16 at 06:36 PM

I am not sure what you mean by using rebuild.bat in UE4. If you are using the binary version of the Engine installed by the Launcher, you won't be able to rebuild the Engine. Does the project not build without running Rebuild.bat?


avatar image Saphirant Sep 22 '16 at 06:47 PM

Nope, without the Rebuild.bat, he can't build :/. I solved it in visual studio(with vc directories) but it doesn't seems to change anything in UE

avatar image Tim C ♦♦ STAFF Sep 22 '16 at 07:05 PM

Since this is happening for the project specifically, could you try deleting the Intermediate folder in the project (not the Engine this time), then right-click on the .uproject file and select the Generate Visual Studio project files option. Once it is done, open the project's .sln file in Visual Studio and build the project. Then see if it still fails in the Editor.


avatar image Saphirant Sep 22 '16 at 07:36 PM

So, without full rebuild visual studio, its not working. And Launch in UE don't work too. But with a full rebuild, it works

avatar image Tim C ♦♦ STAFF Oct 04 '16 at 09:38 PM

Hi Saphirant,

Are you still having trouble with this issue? If so, have you tried using 4.13.1 to see if that works better for you?


avatar image asimms_infinity Oct 27 '16 at 12:52 AM

Trying to start a fresh C++ project on 4.13.2, using the binary on win 10, and running into this issue. I've added the universal crt includes, and I can rebuild the project to see updates, but doing a hot reload in editor returns an error.

LINK: fatal error LNK1104: cannot open file ucrt.lib

avatar image sdf000 Oct 27 '16 at 04:59 PM

I have the same issue. Note that I also have Windows 8.1 Driver Kit installed for another program in addition to Windows 10 Driver.

I used to have to "corecrt.h not found" error until I went into visual studio 2015 and reinstalled Windows 10 SDK, and now have the same error about ucrt.lib. I fix my build manually by making sure Library Directories has $(LibraryPath). Thanks for any information on how to fix/modify the hot reload script to include the library. I do still get the corecrt.h issue when creating a new project.

Also, using windows 7.

EDIT: I've also even tried adding a LIB and INCLUDE environmental variable pointing to the windows SDK includes to no avail. Manually copying corecrt.h into "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" let me get past some parts, but this is obviously not a good path to go down (since there are more files needed and it doesn't look at child directories). Is there any way to get what folders are being used for the Includes when compiling with UnrealBuildTool.exe?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi quinx,

The include paths that you are referring to should be inherited by the project in Visual Studio. If you select either the Include or Library fields and click the drop-down arrow and select Edit, the window that appears should have a checkbox labeled "Inherit from parent or project defaults". Is that checked? If so, the Inherited Values section should include one or more macros. If you click the "Macros> >" button, it will show you a list of all of the available macros, and the paths that they contain. Check to make sure the macros that are shown in the Inherited Values section contain the path in the macros you listed above. In my case, the $(VC_IncludePath) macro contained the $(UniversalCRT_IncludePath) path, and $(VC_LibraryPath_x64) macro contained the $(UniversalCRT_LibraryPath_x64) path.


more ▼

answered Oct 22 '15 at 10:03 PM

avatar image quinx Oct 22 '15 at 11:52 PM

Hi Tim, thanks for the answer.

If I check that option it works (but not hot reloads). Shouldn't that be included by default? Why was it empty when I opened (and thus giving the compiler error)? Also, even if it compiles correctly, the UBT will still give me the same error on Hot Reloads, basically, whatever I changed in my include paths and lib paths are not being picked up by UBT. I believe UBT gets that from env variables?

I do see that UBT actually tries to find the CRT dir for VS2015: https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Programs/UnrealBuildTool/Windows/VCEnvironment.cs#L541

Not sure if it matters but I noticed that my Universal CRT files were not installed where UBT is expecting them to be:

Mine is here:

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

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

In UBT it seems it is:


C:\Program Files (x86)\Windows Kits\10\include

Not sure if auto searches subdirectories.

avatar image quinx Oct 22 '15 at 11:58 PM

Actually, never mind, UBT is actually just getting the version there. I'm still concerned though why UBT is not picking up the includes and lib when I compile the game from the editor.

avatar image bondjamez Aug 09 '16 at 02:20 AM

Has anyone found a solution that also fixes the Hot Reloads issue?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

So I was frustrated enough that I just downloaded the unreal engine source to figure out what was going on. Turns out the build tool looks for the registry "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots" for KitsRoot10, which points to the 64bit version. However, as far as I know there's no 64 bit include/source for Windows 10 SDK. So it's looking in the 64 bit for includes/libs/sources instead of the x86 folder. I manually changed KitsRoot10 to point to the x86 folder (so Program Files to Program Files (x86)) and things seem to be going smoothly, though this might indirectly break other things. Hopefully this helps other people with this issue and maybe in the future the build tool will also check both the 64 bit registry and then the 32 bit registry.

more ▼

answered Oct 28 '16 at 06:44 AM

avatar image

0 1 2

avatar image Tim C ♦♦ STAFF Oct 28 '16 at 03:08 PM

Hi dsunleng,

I just wanted to confirm that your KitsRoot10 registry key was pointing to C:\Program Files\Windows Kits\10 instead of C:\Program Files (x86)\Windows Kits\10. If that is correct, that is...unexpected. My key correctly points to the x86 folder, and I don't recall ever having to modify it to do so. Does uninstalling and reinstalling the kit not update the registry key to point to the correct location?


avatar image dsunleng Oct 28 '16 at 04:39 PM

Yes, it was pointing to Program Files and not (x86). I don't remember how Windows 10 SDK was installed on my computer, but it's likely that there's some installation path that caused it to point there. I really don't want to reinstall the SDK because it'll cause issues, but my Windows 10 Kit SDK was probably installed by itself. I checked my folder history, and the x64 Windows 10 Kit folder was created the same time as "X64 Debuggers and Tools" was installed (a component of Windows 10 SDK, version 10.1.10586.15). This is the best I can do to help, but it does seem like it's possible for people to have the registry pointing to a valid (but not useful) x64 Windows 10 Kit folder and fail the build for some people as seen in this thread.

avatar image Tim C ♦♦ STAFF Oct 28 '16 at 06:17 PM

Thank you for the additional information, and for doing the extra work on this. I had not actually considered that there may be a discrepancy in where the windows kit registry key may be pointing. I'll try to do some additional investigating along those lines.


avatar image asimms_infinity Oct 28 '16 at 06:26 PM

Thanks dsunleng! Just changed the registry keys on my machine and C++ project creation is working smoothly again.

avatar image Saphirant Oct 29 '16 at 02:11 PM

Same here, thanks you

avatar image Tim C ♦♦ STAFF Nov 01 '16 at 03:51 PM

I have a question for anyone who found that they had to modify this registry key in order to successfully build code projects. Do you recall how you originally installed the SDK? I made several attempts to install the SDK myself and the installer always defaulted to install in the Program Files (x86) folder, and it would not let me change it to install in any other location.


avatar image collinstevens Nov 19 '16 at 10:00 AM

Perfect candidate for you, I actually just reformatted back down to Windows 7 Professional (64 bit) SP1 from Windows 10. I freshly installed Visual Studio 2013/2015 without installing the build tools for C++, only installed for C# development. I installed UE4 through the Epic Games Launcher version 4.14.0 and was getting the error first that I didn't have cl.exe, so I installed the build tools for VS2015. I then got the exact same error as the original post, and discovered that the registry key was also set improperly to the 64 bit Program Files directory, after changing it to the 32 bit directory, it worked immediately. I also had installed VS2017 RC1 in between UE4 and the VS2015 C++ build tools. Hope this helps.

avatar image Tim C ♦♦ STAFF Nov 23 '16 at 06:33 PM

Hi collinstevens,

Thanks for the information. I will try to get to a clean computer to see if I can follow your steps. I may not be able to do that until sometime next week, though.

Just for clarity, when you installed the VS2015 build tools, you did that by running the VS2015 installer again, correct?


avatar image collinstevens Nov 24 '16 at 08:59 AM

Yes I did.

avatar image Tim C ♦♦ STAFF Nov 30 '16 at 04:44 PM

I spent some time yesterday and today installing Visual Studio 2015 and the Engine on a clean computer (it isn't the best computer in the world, so the installations took a bit longer than I would have liked). Unfortunately, when I finished up installing the C++ tools in VS2015, the KitsRoot10 registry key contained the correct expected location. I did not include an installation of Visual Studio 2017 RC in my process, so I am going to see if I can get that machine reset again and go through the process again and include that installation step.

One point of clarification: When you installed the C++ tools, did you install ALL of the optional C++ items, or only the build tools?


avatar image Algorithman Dec 18 '16 at 01:24 PM

My solution: on the Forums

Had the same problem, this fixed it and probably is safe/extendable for the furure.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question