I’ve just synced my 4.3 fork of the engine with 4.4 and got it compiling. However, when it gets to the linker I get a ton of linker errors in my new AGameMode super class. This code compiles, links and ran in UE4.3, so I’m not sure what’s changed.
The class is defined like so:
UCLASS(config = Game, notplaceable, BlueprintType, Blueprintable, hidecategories = (Info, Rendering, MovementReplication, Replication, Actor))
class ENGINE_API ABaseGameMode : public AInfo
{
GENERATED_UCLASS_BODY()
/** Restart the game, by default travel to the current map */
virtual void RestartGame();
The first method there is one of the first to throw a linker error. There’s 71 of them, here’s the first 3:
27>EnginePrivate.h.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ABaseGameMode::RestartGame(void)" (?RestartGame@ABaseGameMode@@UEAAXXZ)
27>EnginePrivate.h.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ABaseGameMode::ReturnToMainMenuHost(void)" (?ReturnToMainMenuHost@ABaseGameMode@@UEAAXXZ)
27>Module.Engine.5_of_30.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ABaseGameMode::ReturnToMainMenuHost(void)" (?ReturnToMainMenuHost@ABaseGameMode@@UEAAXXZ)
Been doing some reading on the Unreal Build Tool and will continue to do so, but I have no idea why it’s not linking this. There’s some config somewhere preventing it I assume.
How does this work, and how do I fix this?