Hello everyone, i have an error in UE and sometimes in VS15, when i try to build a project (compile option in UE). This error give me this message: LINK : fatal error LNK1181: cannot open input file ‘ucrt.lib’. Even when im creating a blank c++ project, i get this error. Is there a solution instead of full rebuild in visual studio? (cause when i try to launch a project, it fails)
Are you using a source version of the engine or the binary version from the Launcher? Can you provide the full error message from Visual Studio when you attempt to compile? Based on the LNK1181 error, the likely issue is that the folder path to ucrt.lib is being incorrectly due to spaces. If your project is saved in a location that includes a space anywhere in the file path (such as inside a folder named “Unreal Projects” with the space) then please try creating a new project in another location and let me know if you still get this error.
Im using the binary version from the launcher (version 4.12.5). I tried to create a new project with a path without space but i still get this error. Here is my error while creating a blank c++ projects with starter contents: http://pastebin.com/pZ95Aczf. Thank for anwser
EDIT: I had this error in visual studio too, but with a full rebuild, it works for a few minutes.
All of the errors appear to stem from the ucrt.lib file which appears to be a VS specific file. Please let me know if you get the same error when attempting to compile a non-UE4 solution. Additionally, can you check the C:\Program Files (x86)\Windows Kits\10\Lib folder, there should be two more folders here, both of which with an additional four subfolders. Each of these four subfolders should have four files in them. Can you confirm that this is true for you? Can you also provide a screenshot of the Visual Studio “Select Features” window that can be found by running Add/Remove Programs and choosing to Modify the VS2015 installation.
Hello, in C:\Program Files (x86)\Windows Kits\10\Lib folder, i have 3 folder (10.0.10150.0, 10.0.10240.0, 10.0.14393.0) with 2 more folders and then 4 more subfolder. Here is a screen of my Visual studio feature (http://hpics.li/2915aeb its in french, i don’t knwo how to change the language of installer). And when i tried to run a external program i have the same error, not with “ucrt.lib” but with “kernel32.lib”.
If blank non-UE4 projects are also giving you errors as well then it sounds like an issue with Visual Studio. Please check that you have current Windows SDK for the version of Windows you’re using. If you are using the current Windows SDK and are still experiencing this issue, you can get in contact with Microsoft support (Support Overview | Visual Studio - Visual Studio) and they’ll be able to assist you further with the Visual Studio issues.
I found another post where you seem to have solved the problem you were having. To keep all information about this issue in a central location I have copied your post from the other post:
“Hello, im using UE 4.12.5 and i have a problem during my deployment (Here), and i found this question. And i guess my problem can be solve by changing UBT lib and include directories because i solved it in VS by changing the lib/include directories. (I haven’t WDK installed, and i still have this problem). If someone had same problem and solve it, can he explain me? Thanks for answer”
link : fatal error lnk1104: cannot open file ‘ucrt.lib’
error on multiple files.
To fix this, you need to tell VS where to find the ucrt.lib library file within the filesystem. With the UE4.sln solution file opened in VS, Right Click on the UE4 target and select Properties. On the left side, under the “Configuration Properties” section, Select “VC++ Directories”. On the right side, under “General”, Select the “Library Directories” row, then Click the drop-down arrow and Select “”, then Click “Apply”. For good measure, I went ahead and re-selected the drop-down arrow of the “Library Directories” row and then Selected “”. From there, I added two new lines that pointed to both the x64 and x86 folders (in that order) containing urct.lib library file. The two lines I added were: