Build Error in UE5: LNK1181 Cannot Open libcurl.lib File

Hello!! :wave:

I’m facing a build error with a fresh C++ third-person game project in Unreal Engine 5. This is a basic project with no additional assets or code, but it’s throwing a libcurl related build error:

LINK : fatal error LNK1181: cannot open input file 'ThirdParty\libcurl\7.83.1\lib\Win64\Release\libcurl.lib'

I’ve also encountered a similar issue discussed in this topic, where the suggested solution was to update the Unreal Engine. Despite running the latest version of UE5, the problem persists.

Ouput log:

Engine version i am using:
image

Visual Studio version:
image

Does anyone know how to fix this?

Strange because 5.3.2 has libcurl 8.4.0 not 7.83.1

image
Yes, I just checked my own libcurl folder and it has the same version as yours.
Could it be that there might be a hardcoded path or dependency setting in the project configuration file that points to an older version? I checked my build.cs but there is nothing about libcurl here either.

Look into
Engine\Source\ThirdParty\libcurl\libcurl.Build.cs

I have

// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class libcurl : ModuleRules
{
	public libcurl(ReadOnlyTargetRules Target) : base(Target)
	{
		Type = ModuleType.External;

		PublicDefinitions.Add("WITH_LIBCURL=1");
		PublicDefinitions.Add("CURL_STATICLIB=1");

		string LibCurlPath = Target.UEThirdPartySourceDirectory + "libcurl/8.4.0/";
		PublicSystemIncludePaths.Add(Path.Combine(LibCurlPath, "include"));

		if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
		{
			PublicAdditionalLibraries.Add(Path.Combine(LibCurlPath, "lib", "Unix", Target.Architecture.LinuxName, "Release", "libcurl.a"));
		}
		else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
		{
			string[] Architectures = new string[] {
				"ARM64",
				"x64",
			};
 
			foreach(var Architecture in Architectures)
			{
				PublicAdditionalLibraries.Add(Path.Combine(LibCurlPath, "lib", "Android", Architecture, "Release", "libcurl.a"));
			}
		}
		else if (Target.Platform == UnrealTargetPlatform.Mac)
		{
			PublicAdditionalLibraries.Add(Path.Combine(LibCurlPath, "lib", "Mac", "Release", "libcurl.a"));
			PublicFrameworks.Add("SystemConfiguration");
		}
		else if (Target.Platform == UnrealTargetPlatform.Win64 && !Target.WindowsPlatform.bUseXCurl)
		{
			PublicAdditionalLibraries.Add(Path.Combine(LibCurlPath, "lib", Target.Platform.ToString(), "Release", "libcurl.lib"));
		}

		// Our build requires nghttp2, OpenSSL and zlib, so ensure they're linked in
		AddEngineThirdPartyPrivateStaticDependencies(Target, new string[]
		{
			"nghttp2",
			"OpenSSL",
			"zlib"
		});
	}
}

libcurl.Build.cs (1.6 KB)

Check if your build file also points to the 8.4.0 path


I think we have the same, it also points to 8.4 :grimacing:

Could it be a plugin that is pointing to an older version?
Maybe try disabling all plugins in a fresh project and see if the error persists.

I just disabled all plugins, but my project now fails to open, I have nearly 160 plugins here, but I am not sure which ones are essential for the project.

You have to narrow down the error by way of elimination. I doubt someone can help you remotely unless they had the exact same problem.