hello just on Dependency Injection lecture on Unreal 5.0 C++ Developer: Learn C++ and Make Video Games and ive ran into some errors where added the mover.h file seems to cause issue with TriggerComponent.generated.h ive attempted to do build task outside editor,refresh visual code project. lastly i delete binaries and intemediate folders then tried opening unreal to trigger a rebuild which usally works when get these errors did manage get orginal version back by restoreing binary and intemidate folders
update seems shows this when i try do build seems be something do with binary file
Creating library C:\Users\Matthew\Desktop\CryptRaider\Binaries\Win64\CryptRaider.lib and object C:\Users\Matthew\Desktop\CryptRaider\Binaries\Win64\CryptRaider.exp
TriggerComponent.gen.cpp.obj : error LNK2019: unresolved external symbol “public: void __cdecl UTriggerComponent::SetMover(class UMover *)” (?SetMover@UTriggerComponent@@QEAAXPEAVUMover@@@Z) referenced in
function “public: static void __cdecl UTriggerComponent::execSetMover(class UObject *,struct FFrame &,void * const)” (?execSetMover@UTriggerComponent@@SAXPEAVUObject@@AEAUFFrame@@QEAX@Z)
C:\Users\Matthew\Desktop\CryptRaider\Binaries\Win64\CryptRaider.exe : fatal error LNK1120: 1 unresolved externals
[2/2] WriteMetadata CryptRaider.target cancelled
That says you didn’t define SetMover in the .cpp
thanks for the reply pretty sure I did it here might be saying that since cant open the trigger generated
header file
I think it’s likely that that error you posted was due to not saving the .cpp file before compiling.
However you show a different error in that screenshot, on line 60 Mover should be NewMover. Currently there’s nothing called NewMover which you’re trying to assign to Mover on line 62.
hi yes i just watching lecturre again totally missed that fixed that error so just issue now off the header file
If you can successfully compile then there’s no actual “error” with the code. What VS Code underlines are separate. It can usually be fixed by doing Tools > Refresh VS Code Project within Unreal which will refresh the project files that VS Code uses to understand your code.
hi thanks so yeagh i just did live codeing seem succeed vs code still showing erros after i refeshed vs code but should be fine now since did show an error when i complied
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.