Hi,
In my project, we use the standard C++ library due to some third-party DLL dependencies. This required us to use the standard memory allocator using this line
GlobalDefinitions.Add("FORCE_ANSI_ALLOCATOR=1");
This worked fine until upgrading to UE5.3, where now the project fails to package due to an “Unresolved External Symbol” linker error.
Module.DynamicMesh.2.cpp.obj : error LNK2001: unresolved external symbol "void * __cdecl StdMalloc(unsigned __int64,unsigned __int64)" (?StdMalloc@@YAPEAX_K0@Z)
I have tried with a blank project and by just adding
GlobalDefinitions.Add("FORCE_ANSI_ALLOCATOR=1");
bOverrideBuildEnvironment = true;
to the target.cs files it causes the packaging to fail.
Note that everything works as expected in the editor, the only issue is when it comes to packaging the project.
Does anyone know any way to fix this?
Or if UE5.3 has removed packaging support for StdMalloc / StdFree?
Or should we try to use the UE memory allocators somehow?
Thanks