Failed to link patch UE5

when i try to compile my project it gives me an error and doesnt compile i have also tried a rebuild and build in vscode:

File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\BasePawn.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Projectile.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Tank.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\ToonTanks.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Tower.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\BasePawn.gen.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Projectile.gen.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Tank.gen.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\ToonTanks.init.gen.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Tower.gen.cpp.obj was modified or is new
Building patch from 10 file(s) for Live coding module C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.dll
   Creating library C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.lib and object C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.exp
Projectile.gen.cpp.obj : error LNK2019: unresolved external symbol "private: void __cdecl AProjectile::OnMovementChanged(class UObject *,class APlayerController *)" (?OnMovementChanged@AProjectile@@AEAAXPEAVUObject@@PEAVAPlayerController@@@Z) referenced in function "public: static void __cdecl AProjectile::execOnMovementChanged(class UObject *,struct FFrame &,void * const)" (?execOnMovementChanged@AProjectile@@SAXPEAVUObject@@AEAUFFrame@@QEAX@Z)
C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.exe : fatal error LNK1120: 1 unresolved externals
Failed to link patch (0.000s) (Exit code: 0x460

Can you post your projectile source file

ok wait

mine spawns in a different level than the actual one though so just go to Main level which is my game

I just need to see your AProjectile class the .cop and .h

oh ok

https://drive.google.com/drive/folders/1WEvy8ZsQx4qL0FYWP3bK2PZlJ54g1O3l?usp=sharing

The formatting is all off. I’m on my phone but remove that on movement changed function declaration in the header. And keep the ufunction for onhit

oh god i added that by accident with tabnine

Yeah that will get you lol

i can be stupid i guess ill be looking out for that often if i have errors

Did your code compile now?

its compiling still

it just finished but it gives me this now:

File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\BasePawn.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Projectile.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\Projectile.gen.cpp.obj was modified or is new
File C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Intermediate\Build\Win64\UnrealEditor\Development\ToonTanks\ToonTanks.init.gen.cpp.obj was modified or is new
Building patch from 4 file(s) for Live coding module C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.dll
   Creating library C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.lib and object C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.exp
BasePawn.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl ABasePawn::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@ABasePawn@@CAPEAVUClass@@XZ) referenced in function "public: static void * __cdecl ABasePawn::operator new(unsigned __int64,enum EInternal,class UObject *,class FName,enum EObjectFlags)" (??2ABasePawn@@SAPEAX_KW4EInternal@@PEAVUObject@@VFName@@W4EObjectFlags@@@Z)
BasePawn.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl ABasePawn::ABasePawn(class FVTableHelper &)" (??0ABasePawn@@QEAA@AEAVFVTableHelper@@@Z) referenced in function "public: static class UObject * __cdecl ABasePawn::__VTableCtorCaller(class FVTableHelper &)" (?__VTableCtorCaller@ABasePawn@@SAPEAVUObject@@AEAVFVTableHelper@@@Z)
Projectile.gen.cpp.obj : error LNK2019: unresolved external symbol "private: void __cdecl AProjectile::OnHit(class UPrimitiveComponent *,class AActor *,class UPrimitiveComponent *,struct UE::Math::TVector<double>,struct FHitResult const &)" (?OnHit@AProjectile@@AEAAXPEAVUPrimitiveComponent@@PEAVAActor@@0U?$TVector@N@Math@UE@@AEBUFHitResult@@@Z) referenced in function "public: static void __cdecl AProjectile::execOnHit(class UObject *,struct FFrame &,void * const)" (?execOnHit@AProjectile@@SAXPEAVUObject@@AEAUFFrame@@QEAX@Z)
C:\Users\Aidan\OneDrive\Desktop\ToonTanksProjectSetup_4.25\ToonTanks\Binaries\Win64\UnrealEditor-ToonTanks.patch_0.exe : fatal error LNK1120: 3 unresolved externals
Failed to link patch (0.000s) (Exit code: 0x460)
---------- Finished (0.000s) ----------

I’m not sure linker errors can be a pain. If I was on my pc this would be a lot easier. Do you use version control?

whats that?

Version control is a way to keep bookmarks(commits) of your project so when you break something or unreal is acting wonking you can just revert back to a working version of your project.

I use git. There is a learning curve but it’s not that bad now ah days with all the gui apps. Check out GitHub for desktop Im pretty sure they have some tutorials on how to use it. It’s the one I use.

Now it looks as if you have onhit commented out? In your projectile.cpp

If onhit does not have a definition your code will not compile

ohh