Cannot package app

Cannot package app


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 ?

Sincerely yours,

Means you are linking in the same code from two different places.

Yes I understood that, tinyxml is included both in Cesium and inside Unreal Engine with their nDisplay plugin. What can I do to avoid this issue if I still want to package with Cesium ? Thanks.

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 ?

Hello @M003TSkyReal,

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.


1 Like

Thank you @agallegos,

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.

Thanks again for your feedback.

Hi @M003TSkyReal,

Thanks for following up! Glad to hear they’re working on it - I’ll update the team so that we can improve compatibility when Epic moves the library.


1 Like