Error during build (error LNK2001 and error LNK2019)

When i try launch my game on PC(launch this level on ***), or try packaging my project i get an error

(DimensionFP is name of project)

Log:

UATHelper: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: E:\Epic Games\UE_4.16\Engine\Binaries\DotNET\UnrealBuildTool.exe DimensionsFP Win64 Development -Project=E:\GameCreate\DimensionsFP\DimensionsFP.uproject E:\GameCreate\DimensionsFP\DimensionsFP.uproject -NoUBTMakefiles -remoteini=“E:\GameCreate\DimensionsFP” -noxge -generatemanifest -NoHotRelo
ad
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 42,5334328s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: E:\Epic Games\UE_4.16\Engine\Binaries\DotNET\UnrealBuildTool.exe DimensionsFP Win64 Development -Project=E:\GameCreate\DimensionsFP\DimensionsFP.uproject E:\GameCreate\DimensionsFP\DimensionsFP.uproject -NoUBTMakefiles -remoteini=“E:\GameCreate\DimensionsFP” -noxge -NoHotReload -ignorejunk
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: Performing 1 actions (2 in parallel)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: [1/1] Link DimensionsFP.exe
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: Creating library E:\GameCreate\DimensionsFP\Binaries\Win64\DimensionsFP.lib and object E:\GameCreate\DimensionsFP\Binaries\Win64\DimensionsFP.exp

UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol “void __cdecl EmptyLinkFunctionForStaticInitialization ** DimensionsFP ** (void)” (?EmptyLinkFunctionForStaticInitialization ** DimensionsFP ** @@YAXXZ) referenced in function “void __cdecl UELinkerFixups(void)” (?UELinkerFixups@@YAXXZ)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Launch.lib(Module.Launch.cpp.obj) : error LNK2019: unresolved external symbol “bool GIsGameAgnosticExe” (?GIsGameAgnosticExe@@3_NA) referenced in function “void __cdecl LaunchFixGameNameCase(void)” (?LaunchFixGameNameCase@@YAXXZ)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.4_of_9.cpp.obj) : error LNK2001: unresolved external symbol “bool GIsGameAgnosticExe” (?GIsGameAgnosticExe@@3_NA)

UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-BuildPatchServices.lib(Module.BuildPatchServices.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-AutomationController.lib(Module.AutomationController.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-HTTP.lib(Module.HTTP.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-PakFile.lib(Module.PakFile.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-NetworkFile.lib(Module.NetworkFile.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-AutomationWorker.lib(Module.AutomationWorker.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Engine.lib(Module.Engine.15_of_38.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Engine.lib(Module.Engine.34_of_38.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Engine.lib(Module.Engine.23_of_38.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-SandboxFile.lib(Module.SandboxFile.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.5_of_9.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-CoreUObject.lib(Module.CoreUObject.1_of_6.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Projects.lib(Module.Projects.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Engine.lib(Module.Engine.19_of_38.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Launch.lib(Module.Launch.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.4_of_9.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.1_of_9.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.8_of_9.cpp.obj) : error LNK2001: unresolved external symbol “wchar_t * GInternalGameName” (?GInternalGameName@@3PA_WA)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.4_of_9.cpp.obj) : error LNK2019: unresolved external symbol “bool const GIsDebugGame” (?GIsDebugGame@@3_NB) referenced in function “public: static enum EBuildConfigurations::Type __cdecl FApp::GetBuildConfiguration(void)” (?GetBuildConfiguration@FApp@@anon60641000?AW4Type@EBuildConfigur
ations@@anonymous_user_9674a66c)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: UE4-Core.lib(Module.Core.1_of_9.cpp.obj) : error LNK2019: unresolved external symbol “wchar_t const * const GForeignEngineDir” (?GForeignEngineDir@@3PEB_WEB) referenced in function “public: static wchar_t const * __cdecl FGenericPlatformMisc::EngineDir(void)” (?EngineDir@FGenericPlatformMisc@@SAPEB_WX
Z)
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: E:\GameCreate\DimensionsFP\Binaries\Win64\DimensionsFP.exe : fatal error LNK1120: 5 unresolved externals
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: E:\GameCreate\DimensionsFP\Binaries\Win64\DimensionsFP.exe
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 398,26 seconds (Local executor: 0,00 seconds)
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 402,3440127s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): E:\Epic Games\UE_4.16\Engine\Binaries\DotNET\UnrealBuildTool.exe DimensionsFP Win64 Development -Project=E:\GameCreate\DimensionsFP\DimensionsFP.uproject E:\GameCreate\Dimensio
nsFP\DimensionsFP.uproject -NoUBTMakefiles -remoteini=“E:\GameCreate\DimensionsFP” -noxge -NoHotReload -ignorejunk. See logfile for details: ‘UnrealBuildTool-2017.08.31-11.05.17.txt’
UATHelper: Packaging (Windows (64-bit)): в AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (64-bit)): в AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary2 EnvVars)
UATHelper: Packaging (Windows (64-bit)): в AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Diction
ary2 InTargetToManifest) UATHelper: Packaging (Windows (64-bit)): в Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) UATHelper: Packaging (Windows (64-bit)): в BuildCookRun.DoBuildCookRun(ProjectParams Params) UATHelper: Packaging (Windows (64-bit)): в BuildCookRun.ExecuteBuild() UATHelper: Packaging (Windows (64-bit)): в AutomationTool.BuildCommand.Execute() UATHelper: Packaging (Windows (64-bit)): в AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.Automation.Process(String[] Arguments) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.Program.MainProc(Object Param) UATHelper: Packaging (Windows (64-bit)): в AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
UATHelper: Packaging (Windows (64-bit)): в AutomationTool.Program.Main()
UATHelper: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hi. It’s not so obvious but check your game runtime module please. It should use IMPLEMENT_PRIMARY_GAME_MODULE macro instead of IMPLEMENT_MODULE

Thank You so much. You saved me a ton of time.

Thanks a lot! You saved me too :smiley: