Developer Notes

It is correct in the sense that you literally cannot use this option with the binary engine, but I've fixed it not failing sooner.

Description

Enabling bUseLoggingInShipping for a project prevents the project from being built for Shipping if the project includes replicated properties. This is only an issue with binary builds of the Engine. If the Engine was built from source code, the project will successfully build for Shipping.

Steps to Reproduce
  1. Create a new basic code project.
  2. Add a new Actor code class to the project.
  3. Close the Editor.
  4. Set bUseLoggingInShipping to true inside the project's Target.cs file.
  5. In the header file for the new Actor class, add a replicated property, eg:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "Networking", meta = (ClampMin = "0", UIMin = "0"))
    float ControllerNetUpdateRate;
    
  6. In the source file for the new Actor class, make sure to include Net/UnrealNetwork.h.
  7. Add an implementation for GetLifetimeReplicatedProps(), eg:
    void AMyActor::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
    {
    	Super::GetLifetimeReplicatedProps(OutLifetimeProps);
    
    	DOREPLIFETIME(AReplicationTest, ControllerNetUpdateRate);
    }
    
  8. Build the project for Shipping Win64.

RESULT:
The build fails with the following linker error:

1>MyActor.cpp.obj : error LNK2001: unresolved external symbol "struct FLogCategoryLogType LogType" (?LogType@@3UFLogCategoryLogType@@A)
1>MyActor.gen.cpp.obj : error LNK2019: unresolved external symbol "struct FLogCategoryLogClass LogClass" (?LogClass@@3UFLogCategoryLogClass@@A) referenced in function "protected: void __cdecl TProperty_Numeric<float>::ConvertFromInt<__int64>(class FArchive &,void *,struct FPropertyTag const &)" (??$ConvertFromInt@_J@?$TProperty_Numeric@M@@IEAAXAEAVFArchive@@PEAXAEBUFPropertyTag@@@Z)

EXPECTED:
The build completes successfully.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-56418 in the post.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.17.24.18.34.19
Target Fix4.20
Fix Commit3965269
Main Commit4034515
Release Commit4095966
CreatedMar 22, 2018
ResolvedMar 26, 2018
UpdatedMay 31, 2018
View Jira Issue