Constant Library Conflicts

For a workaround, see the “Manual fix” part in this question: UE macros and 3rd party library conflicts - Programming & Scripting - Unreal Engine Forums

In short, you can tweak the UBT-generated response files to allow you to include any 3rd party headers before the UE headers get processed and pollute the macro space:

  1. In Intermediate[…]\YourSourceFile.cpp.obj.response file, remove the line /FI"[…]\Engine\SharedPCH.Engine.h"
  2. Include that file in YourSourceFile.cpp after including your 3rd party library (and before any other UE stuff).

The downside is that you need to re-apply this modification every time after UBT chooses to regenerate the response files.

Of course, this is not how things should be. I sincerely hope that Epic chooses to do something about this.