Linker error in non editor build config when including Boost

Hello, I hope someone can help me with this. I can build normally in a Development Editor config without issues. However, if I try to build in Shipping/Development/DebugGame config, I get the below error. I’m using the header-only Boost::geometry library. The library’s headers are added in a separate module’s Build.cs with PublicIncludePaths. Then, I add that module to my game’s Build.cs PrivateDependencyModuleNames. I did try including the headers along with my game c++ classes, but got the same errors.

  • LINK : warning LNK4217: symbol ‘??1bad_cast@std@@UEAA@XZ (public: virtual __cdecl std::bad_cast::~bad_cast(void))’ defined in ‘IlmImf.lib(ImfStdIO.obj)’ is imported by ‘ProceduralTile.cpp.obj’ in function ‘"public: virtual void * __cdecl boost::numeric::bad_numeric_cast::`scalar deleting destructor’(unsigned int)" (??_Gbad_numeric_cast@numeric@boost@@UEAAPEAXI@Z)’

  • 1>ProceduralTile.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl std::bad_cast::bad_cast(char const *)” (_imp??0bad_cast@std@@QEAA@PEBD@Z) referenced in function “public: __cdecl boost::numeric::negative_overflow::negative_overflow(void)” (??0negative_overflow@numeric@boost@@QEAA@XZ)

  • 1>ProceduralTile.cpp.obj : error LNK2019: unresolved external symbol “void __cdecl boost::throw_exception(class stdext::exception const &)” (?throw_exception@boost@@YAXAEBVexception@stdext@@@Z) referenced in function “__int64 __cdecl boost::numeric_cast<__int64,float>(float)” (??$numeric_cast@_JM@boost@@YA_JM@Z)

  • 1>ProceduralTile.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl std::bad_cast::_Doraise(void)const " (?_Doraise@bad_cast@std@@MEBAXXZ)

ProceduralTile.cpp is my C++ class, and it includes boost.
I’d appreciate any insight into this you can provide. Thanks.

Edit: I have discovered a workaround. changing references from std::bad_cast to std::exception in the boost numeric_conversion avoids the link error in shipping configs.