Fatal error LNK1181: cannot open input file 'delayimp.lib' in association with attempting to create a new plugin from a UE5 provided template

Im not sure where to debug this, Im guessing that my VS project is trying to build something that doesnt exist, because I highly doubt this “delayimp.lib” cant be found as the unreal project that my plugin is living in was building just fine a few minutes ago with some custom C++ classes I had made in a separate plugin.

How would one go about debugging this and digging deeper in the source? Can I configure the build system to provide more detailed data about whats happening behind the scenes here?

This is the full build log in visual studio:

Build started...
1>------ Build started: Project: ScalableDesktopTest, Configuration: Development_Editor x64 ------
1>Using bundled DotNet SDK
1>Log file: C:\Users\olliv\AppData\Local\UnrealBuildTool\Log.txt
1>Building ScalableDesktopTestEditor...
1>Using Visual Studio 2022 14.29.30136 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>[Adaptive Build] Excluded from ScalableDesktopTest unity file: ClassToConvertFromBPToCPPProject.cpp, ScalableDesktopTest.cpp
1>Determining max actions to execute in parallel (16 physical cores, 24 logical cores)
1>  Executing up to 16 processes, one per physical core
1>  Requested 1.5 GB free memory per action, 14.6 GB available: limiting max parallel actions to 9
1>Building 3 actions with 3 processes...
1>[1/3] Link UnrealEditor-ScalableDesktopTest.dll
1>LINK : fatal error LNK1181: cannot open input file 'delayimp.lib'
1>[2/3] Link UnrealEditor-UnrealToolbox.dll
1>LINK : fatal error LNK1181: cannot open input file 'delayimp.lib'
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "C:\UE\UE_5.0\Engine\Build\BatchFiles\Build.bat ScalableDesktopTestEditor Win64 Development -Project="C:\Users\olliv\Documents\Unreal Projects\ScalableDesktopTest\ScalableDesktopTest.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "ScalableDesktopTest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thanks :slight_smile:

2 Likes

Seems like a bug in 5.0.1. 5.0EA doesnt have it.

TEMPORARY FIX (this will break every time you regenerate sln files and wont help you when letting Unreal Engine build) : Visual Studio > Topbar > Project > [projectNmae]Properties > Left sidebar > Configuratino Properties > VC++ Directories > General > Library directories. There ensure $(LibraryPath) is filled in.

Not sure if one can use the C# build files to include this file manually?

2 Likes

Is anyone yet to have a more permanent solution for this?

Up until now Ive simply not used any C++ due to this error (and the inconvenience with the solution I found) - I’ve now reached a point when I really do could benefit from some C++ code in my project, would rather not fight with Unreal Engine to add this custom configuration property between each compile.

Turns out that I was actually missing some packages in my Visual Studio installation & that changing the project settings like mentioned in my previous post really just lets me use packages that I had in an older VS installations on my system.

So the long term solution is to go to the “Visual Studio Installer” and make sure you have everything thats needed (and the correct version of everything that is needed, as Unreal Engine can silently refuse to use packages that are slightly off in the versioning)

1 Like

How do you managed to fix this?

A possible solution is to install the MSVC v142 - VS 2019 C++ build tools package (v14.29-16.11)

4 Likes

Yes this is the solution

Going into ‘Programs’ in Windows11 Settings, finding Visual Studio Installer. and clicking on ‘Repair’ did the trick for me.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.