link errors

I am following some code from the Building an RPG with Unreal book and while I was able to fix some errors, I just got some link errors and this time I’m completely confused.

Here’s the errors

Error RPGGameMode.cpp.obj : error LNK2019: unresolved external symbol “public: static class UGameCharacter * __cdecl UGameCharacter::CreateGameCharacter(struct FEnemyInfo *,class UObject *)” (?CreateGameCharacter@UGameCharacter@@SAPEAV1@PEAUFEnemyInfo@@PEAVUObject@@@Z) referenced in function “private: void __cdecl ARPGGameMode::TestCombat(void)” (?TestCombat@ARPGGameMode@@AEAAXXZ)
Error RPGGameMode.cpp.obj : error LNK2019: unresolved external symbol “public: void __cdecl URPGGameInstance::PrepareReset(void)” (?PrepareReset@URPGGameInstance@@QEAAXXZ) referenced in function “private: virtual void __cdecl ARPGGameMode::Tick(float)” (?Tick@ARPGGameMode@@EEAAXM@Z)
Error C:\ParageofAge\Binaries\Win64\UE4Editor-ParageofAge-8721.dll : fatal error LNK1120: 2 unresolved externals

I read how these errors can be caused by the build.cs so here’s what I have in the build.cs

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class ParageofAge : ModuleRules
{
public ParageofAge(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string]{ “Core”, “CoreUObject”, “Engine”, “InputCore”, “UMG”, “Slate”, “SlateCore” });
PrivateDependencyModuleNames.AddRange(new string] { });
}
}

I apologize in advance for any confusion however any help would definitely be appreciated.

Thanks

The error just yields that UGameCharacter::CreateGameCharacter and URPGGameInstance::PrepareReset have no implementation, I guess those are taken from the book you are reading?

Between the book and the .h, .cpp files that I was able to download from the publisher website. I did my best to follow the book, however it really wasn’t helpful so there was a lot of code I copied and pasted from the download files and tried to change the necessary code needed for my project. I believe I got the majority of it but with these errors, especially the @@PEAVUObject@@@Z part I’ll see what I need to fix with the UGameCharacter::CreateGameCharacter and the URPGGameInstance::PrepareReset but other than that I’m not sure what to do after that. I apologize for the confusion and I know I sound like a complete noob, however while I can memorize a lot of C++ and understand the concept behind it, there’s still a lot of C++ I haven’t memorized and therefore unsure how to fix.

Any help on improving on C++ or if you can recommend any good reference books would be awesome.

Thanks again.

I realized what I did wrong. There was two .cpp files that I didn’t have everything in there that I needed. Again thanks for the help.

Nice you found it ^^