# Unable to compile shipping build with logging in 4.18.1

**URL:** <https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218>\
**Category:** Platform & Builds\
**Tags:** logging, UE4-18, win64, build, unreal-engine, bug-report, question\
**Created:** [November 21, 2017, 1:57pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218 "2017-11-21T13:57:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreschaaf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andreschaaf](https://forums.unrealengine.com/u/andreschaaf)\
**Post date:** [November 21, 2017, 1:57pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/1 "2017-11-21T13:57:48Z")

</div>

Hi,

I tried to enable shipping build logging in 4.18.1 but I get still linker errors

> UATHelper: Packaging (Windows  
> (64-bit)): Creating library  
> E:\FallOfChulua\Binaries\Win64\FallOfChulua-Win64-Shipping.lib  
> and object  
> E:\FallOfChulua\Binaries\Win64\FallOfChulua-Win64-Shipping.exp  
> UATHelper: Packaging (Windows  
> (64-bit)): SaveGameComponent.cpp.obj :  
> error LNK2001: unresolved external  
> symbol “struct FLogCategoryLogTemp  
> LogTemp”  
> (?LogTemp@@3UFLogCategoryLogTemp@@A)  
> UATHelper: Packaging (Windows  
> (64-bit)): SaveGameController.cpp.obj  
> : error LNK2001: unresolved external  
> symbol “struct FLogCategoryLogTemp  
> LogTemp”  
> (?LogTemp@@3UFLogCategoryLogTemp@@A)  
> UATHelper: Packaging (Windows  
> (64-bit)): QuestController.cpp.obj :  
> error LNK2001: unresolved external  
> symbol “struct FLogCategoryLogTemp  
> LogTemp”  
> (?LogTemp@@3UFLogCategoryLogTemp@@A)  
> UATHelper: Packaging (Windows  
> (64-bit)): SaveGameController.cpp.obj  
> : error LNK2001: unresolved external  
> symbol “struct  
> FLogCategoryLogSerialization  
> LogSerialization” (?  
> LogSerialization@@3UFLogCategoryLogSerialization@@A)  
> UATHelper: Packaging (Windows  
> (64-bit)): LibTrelloBugReport.cpp.obj  
> : error LNK2001: unresolved external  
> symbol “struct FLogCategoryLogJson  
> LogJson”  
> (?LogJson@@3UFLogCategoryLogJson@@A)  
> UATHelper: Packaging (Windows  
> (64-bit)):  
> E:\FallOfChulua\Binaries\Win64\FallOfChulua-Win64-Shipping.exe  
> : fatal error LNK1120: 3 unresolved  
> externals

I added the “bUseLoggingInShipping” in my “FallOfChulua.target.cs” file. There was already a problem reported and it was closed, Therefore I switched over to 4.18 because I really need the logging because of bug which only happens in shipping build. I will stay on 4.18 but I still have no clue why the bug happens. Probably I have to implement my own logging system… 😃 … No, this has to work.

Kind regards Andre Schaaf-Ledermüller

---

<div class="post-metadata">

**Author:** ![HiIAmMoot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HiIAmMoot](https://forums.unrealengine.com/u/HiIAmMoot)\
**Post date:** [February 27, 2018, 6:59pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/2 "2018-02-27T18:59:29Z")

</div>

I too am experiencing this problem.

---

<div class="post-metadata">

**Author:** ![SlimeQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SlimeQ](https://forums.unrealengine.com/u/SlimeQ)\
**Post date:** [March 19, 2018, 11:54pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/3 "2018-03-19T23:54:23Z")

</div>

any updates?

---

<div class="post-metadata">

**Author:** ![HiIAmMoot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HiIAmMoot](https://forums.unrealengine.com/u/HiIAmMoot)\
**Post date:** [March 20, 2018, 7:26am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/4 "2018-03-20T07:26:08Z")

</div>

The reason for this happening apparently is if you have _any_ UE\_LOG macros in your C++ code. This also includes referencing to UE4 source code which have that macro AFAIK.

---

<div class="post-metadata">

**Author:** ![SlimeQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SlimeQ](https://forums.unrealengine.com/u/SlimeQ)\
**Post date:** [March 20, 2018, 9:23am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/5 "2018-03-20T09:23:38Z")

</div>

I knew that much. From what I’ve seen in the code it seems like DECLARE\_LOG\_CATEGORY doesn’t get defined properly which makes all log categories invalid. Seems like an order of operations issue. Was hoping one of y’alls had a workaround

---

<div class="post-metadata">

**Author:** ![HiIAmMoot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HiIAmMoot](https://forums.unrealengine.com/u/HiIAmMoot)\
**Post date:** [March 20, 2018, 10:22am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/6 "2018-03-20T10:22:43Z")

</div>

Sadly no, I’m urgently trying to find a fix but no luck yet. My shipping builds crash on startup, and there’s no way for me to figure out what’s going without logging.

---

<div class="post-metadata">

**Author:** ![SlimeQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SlimeQ](https://forums.unrealengine.com/u/SlimeQ)\
**Post date:** [March 21, 2018, 6:47pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/7 "2018-03-21T18:47:00Z")

</div>

Apparently LogTemp can’t be used in a shipping build, so a potential workaround is just to change all LogTemps to something else. Though it looks like you’re also having issues with LogSerialization

---

<div class="post-metadata">

**Author:** ![HiIAmMoot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HiIAmMoot](https://forums.unrealengine.com/u/HiIAmMoot)\
**Post date:** [March 27, 2018, 11:42am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/8 "2018-03-27T11:42:14Z")

</div>

I’m also having issues with LogJson & LogSlate.

I’ve removed all logs from my project but I still get errors, this is really weird.

---

<div class="post-metadata">

**Author:** ![raianlp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@raianlp](https://forums.unrealengine.com/u/raianlp)\
**Post date:** [August 11, 2018, 11:42am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/9 "2018-08-11T11:42:32Z")

</div>

Also have the same issues!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7d4468a9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7d4468a9](https://forums.unrealengine.com/u/anonymous_user_7d4468a9)\
**Post date:** [September 7, 2018, 5:24pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/10 "2018-09-07T17:24:56Z")

</div>

has this ever been resolved for 4.18.2 ? We are experiencing the same issue with various LOG related compier errors when using the above mentioned boolean in the target files.

We are not able to upgrade to another engine for now so ideally we find a way to do this in 4.18.2

---

<div class="post-metadata">

**Author:** ![SlimeQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SlimeQ](https://forums.unrealengine.com/u/SlimeQ)\
**Post date:** [September 10, 2018, 10:19pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/11 "2018-09-10T22:19:39Z")

</div>

I don’t think so. You could try just writing out to a file manually or something

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [September 5, 2021, 9:30pm UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/12 "2021-09-05T21:30:59Z")

</div>

Surprisingly this is still a problem to this day! I was able to (very hackily) circumvent the issue by convincing the linker that the definitions exist in my project in my own log.cpp file

my code is as follows:

```
#if UE_BUILD_SHIPPING
#include "DataTableUtils.h"
#include "EngineLogs.h"

DEFINE_LOG_CATEGORY(LogJson);
DEFINE_LOG_CATEGORY(LogType);
DEFINE_LOG_CATEGORY(LogPhysics);
DEFINE_LOG_CATEGORY(LogNetPlayerMovement);
DEFINE_LOG_CATEGORY(LogSerialization);
DEFINE_LOG_CATEGORY(LogDataTable);
#endif

```

Though this may satisfy my project’s linker needs, the needs will likely be different per project, and may not even have been by design by the engineers at Epic!

Additionally, even with all of these things crossed off the list, the log is still not showing up in shipping in Epic’s distributed engine versions… very sad days.  
Hopefully you can all figure out what you need and get those shipping logs running.

-Spiris

---

<div class="post-metadata">

**Author:** ![Trout\_Zhang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trout\_Zhang](https://forums.unrealengine.com/u/Trout_Zhang)\
**Post date:** [June 2, 2023, 8:47am UTC](https://forums.unrealengine.com/t/unable-to-compile-shipping-build-with-logging-in-4-18-1/410218/13 "2023-06-02T08:47:29Z")

</div>

Did the same for our UE5 based binary engine. But like you said, a lot of logs are missing, it’s better to use a source engine instead.
