UE5编译常见异常:
Error LNK2019 : 无法解析的外部符号 ** 中引用了该符号
已定义且可能匹配的符号上的提示:"private: bool __cdecl *::*(void)"
大概率是因为在 *.Build.cs 文件中缺少相应模块引用:
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class PipeSDKPlugin : ModuleRules
{
public PipeSDKPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" ,"新增模块引用"});
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}