I’m currently trying to package my Unreal app using Cesium but I get packaging error
LNK2005 : “protected: __cdecl tinyxml2::XMLComment::XMLComment(class tinyxml2::XMLDocument *)” (??0XMLComment@tinyxml2@@IEAA@PEAVXMLDocument@1@@Z) already defined in tinyxml2.lib(tinyxml2.obj)"
which seems to happen when using the Unreal nDisplay plugin which is already including tinyxml2.
Could it be possible to change the name of the lib to include to avoid future include conflicts ?
Hi Jalbert, thanks for your answer, and obviously, the issue comes from the tinyxml2.lib that is imported in Cesium and NDisplay plugin.
The issue is easily reproducable in a new Unreal empty project by enabling Cesium, NDisplay and packaging the project. No code is needed to make it crash.
I assume that we will not be the only ones trying to use Cesium in virtual production context.
Do you have any idea on how we could get around this issue ?
Thank you for bringing this to our attention! I’ve created an issue here so that we can track this and hopefully find a solution soon. I’ll also reach out to the engineering team to see if there’s a quick workaround in the meantime.
We asked Epic on our end for a solution in this UDN post and they replied that they’re planning to move tinyxml2 in the engine third party libraries with Unreal 5.1 release. It would then be possible to only include tinyxml once from the engine directory directly.