microsoft / MixedReality-QRCode-Sample

A single repository of Mixed Reality samples in Unity.
MIT License
101 stars 29 forks source link

Does not build to Windows IL2CPP #23

Open Reag opened 11 months ago

Reag commented 11 months ago

Which sample are you reporting a bug in?

Latest commit in OpenXR branch

Describe the bug When attempting to build the project for a desktop target of IL2CPP, it fails to build with the following error:

   Creating library Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.lib and object Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.exp
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol RoGetActivationFactory referenced in function IL2CPPLinkage_RoGetActivationFactory_m28A995C87663759610B3651CE3C0531D7D1E411A
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsCreateString referenced in function IL2CPPLinkage_WindowsCreateString_m7A2ACFBAA6CF8ADB276044CD79B504D7FA70CBA4
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsGetStringRawBuffer referenced in function IL2CPPLinkage_WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsDeleteString referenced in function IL2CPPLinkage_WindowsDeleteString_m8175860EEA9E79F2F530A1EC165CE65FDD475933
Library\Bee\artifacts\WinPlayerBuildProgram\u1oik\GameAssembly.dll : fatal error LNK1120: 4 unresolved externals

This appears to be caused by issues in one of the DLLs included with the sample.

To Reproduce Steps to reproduce the behavior:

  1. Install the sample 1a. (Optional) Make and test a Mono build to ensure that it is working correctly
  2. Set Player Settings to the IL2CPP Scripting Backend
  3. Build

Expected behavior A working build is created

Actual behavior Project fails to generate a working build

Screenshots image image

Additional context Having the QR working with IL2CPP is critical for any project that has strict performance requirements. Having run into this issue in my main project I manage, I tested the samples to see if this IL2CPP build failure existed here as well. Sadly, it appears to. Because the internals of the Microsoft.MixedReality.QR are not public, this seems to be the best place to put this bug report. It would help the project I manage considerably if this build issue could be solved!