Occur fatal error 1853 after use FObjectInitializer

RedChiken
Sat, 18 Apr 2020 11:13:55 +0000
C++

I tried to edit Character Movement Component to custom one.

I found some Youtube Tutorial https://www.youtube.com/watch?v=Of8SGBa3WvU, and follow it.

When I build in VS, Everything is fine. But When I build in UE4 Editor, Fatal Error 1853 occur and fail to build.

below is Edited My CharacterMovementComponent

#include "UObject/UObjectGlobals.h"

UTHCharacterMovementComponent::UTHCharacterMovementComponent(const class FObjectInitializer& ObjectInitializer) : UCharacterMovementComponent(ObjectInitializer)
{
    .......
}

and Character class.

#include "UObject/UObjectGlobals.h"
#include "net/UnrealNetwork.h"
#include "Engine.h"


ATHCharacterBase::ATHCharacterBase(const class FObjectInitializer& ObjectInitializer) : ACharacter(ObjectInitializer.SetDefaultSubobjectClass<UTHCharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
{
    ....
}

this is Error Log.

CompilerResultsLog: THCharacterMovementComponent.cpp (0:00.86 at +0:00)
CompilerResultsLog: G:\Project\Game\TreasureHunter\Source\TreasureHunter\Private\Animation\THCharacterMovementComponent.cpp: fatal error C1853: 'G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\TreasureHunterEditor\Development\Engine\SharedPCH.Engine.h.pch' ?̸? ?????ϵ? ???? ?????? ?ٸ? ?????? ?????Ϸ????? ?????????ų?, ?̸? ?????ϵ? ?????? C++?ε? C???? ???
??ϰ? ?ְų? ?? ?ݴ??? ?????Դϴ?.
CompilerResultsLog: Error executing E:\Epic Games\UE_4.24\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
CompilerResultsLog: THCharacterBase.cpp (0:00.78 at +0:00)
CompilerResultsLog: G:\Project\Game\TreasureHunter\Source\TreasureHunter\Private\Character\THCharacterBase.cpp: fatal error C1853: 'G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\TreasureHunterEditor\Development\Engine\SharedPCH.Engine.h.pch' ?̸? ?????ϵ? ???? ?????? ?ٸ? ?????? ?????Ϸ????? ?????????ų?, ?̸? ?????ϵ? ?????? C++?ε? C???? ?????ϰ? ?ְų? ??
?ݴ??? ?????Դϴ?.
CompilerResultsLog: Error executing E:\Epic Games\UE_4.24\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
CompilerResultsLog: Module.TreasureHunter.cpp (0:00.84 at +0:01)
CompilerResultsLog: G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\UE4Editor\Development\TreasureHunter\Module.TreasureHunter.cpp: fatal error C1853: 'G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\TreasureHunterEditor\Development\Engine\SharedPCH.Engine.h.pch' ?̸? ?????ϵ? ???? ?????? ?ٸ? ?????? ?????Ϸ????? ?????????ų?, ?̸? ?????ϵ? ?????? C
++?ε? C???? ?????ϰ? ?ְų? ?? ?ݴ??? ?????Դϴ?.
CompilerResultsLog: Error executing E:\Epic Games\UE_4.24\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
CompilerResultsLog: Module.TreasureHunter.gen.1_of_2.cpp (0:00.73 at +0:02)
CompilerResultsLog: G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\UE4Editor\Development\TreasureHunter\Module.TreasureHunter.gen.1_of_2.cpp: fatal error C1853: 'G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\TreasureHunterEditor\Development\Engine\SharedPCH.Engine.h.pch' ?̸? ?????ϵ? ???? ?????? ?ٸ? ?????? ?????Ϸ????? ?????????ų?, ?̸? ?????
ϵ? ?????? C++?ε? C???? ?????ϰ? ?ְų? ?? ?ݴ??? ?????Դϴ?.
CompilerResultsLog: Error executing E:\Epic Games\UE_4.24\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
CompilerResultsLog: Module.TreasureHunter.gen.2_of_2.cpp (0:00.78 at +0:03)
CompilerResultsLog: G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\UE4Editor\Development\TreasureHunter\Module.TreasureHunter.gen.2_of_2.cpp: fatal error C1853: 'G:\Project\Game\TreasureHunter\Intermediate\Build\Win64\TreasureHunterEditor\Development\Engine\SharedPCH.Engine.h.pch' ?̸? ?????ϵ? ???? ?????? ?ٸ? ?????? ?????Ϸ????? ?????????ų?, ?̸? ?????
ϵ? ?????? C++?ε? C???? ?????ϰ? ?ְų? ?? ?ݴ??? ?????Դϴ?.
CompilerResultsLog: Error executing E:\Epic Games\UE_4.24\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)

Some part of log is crashed, so I cannot find where is the problem exactly.

What is the problem of this code? And How to make it works?

2 posts - 1 participant