Hello, I’am using Profile-Guided Optimization (PGO) with Unreal 5.7.1. in Win64
I could genereate *.pgd/.*pgc file with
- using following target.cs to build shipping sln, and i can generate *.pgd file
public class ThirdPerson : TargetRules
{
public ThirdPerson(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
// DefaultBuildSettings = BuildSettingsVersion.V5;
ExtraModuleNames.AddRange( new string[] { "ThirdPerson" } );
DefaultBuildSettings = BuildSettingsVersion.Latest;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
WindowsPlatform.bStrictPreprocessorConformance = true;
bPGOProfile = true;
}
}
- run ThirdPerson.exe packaged game, and I got *.pgc file.
- I put .pgd/.pgc file in “.Platform/Windows/Build/PGO
- Using following Target.cs to rebuild the shiping sln
public class ThirdPerson : TargetRules
{
public ThirdPerson(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
// DefaultBuildSettings = BuildSettingsVersion.V5;
ExtraModuleNames.AddRange( new string[] { "ThirdPerson" } );
DefaultBuildSettings = BuildSettingsVersion.Latest;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
WindowsPlatform.bStrictPreprocessorConformance = true;
bPGOOptimize = true;
}
}
But I got error
fatal error C1301: read database : “…\ThirdPerson\Binaries\Win64\ThirderPerson.pgd”, invalid format, please delete and rebuild
Link: fatal error LNK1257: code generate failed…