Forum Discussion

spirit126's avatar
spirit126
Copper Contributor
May 30, 2023

QR code tracking on Android with MRTK3: IL2CPPLinkage error when building library

Unity Building Library failed, IL2CPPLinkage error, with MRTK3 and QR Code Tracking on Android

I tried to track a QR code with MRTK 3 and Andriod. https://localjoost.github.io/MRTK2-to-MRTK3-migrating-the-QRCode-sample/

The following error occurs when building on Android:

 

Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
Library/Bee/artifacts/Android/d8kzr/soo2_.QR.DotNet.o: In function `IL2CPPLinkage_WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6':
H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1395: undefined reference to `WindowsGetStringRawBuffer'
H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1395: undefined reference to `WindowsGetStringRawBuffer'
Library/Bee/artifacts/Android/d8kzr/soo2_.QR.DotNet.o: In function `IL2CPPLinkage_WindowsDeleteString_m8175860EEA9E79F2F530A1EC165CE65FDD475933':
H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1405: undefined reference to `WindowsDeleteString'
H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1405: undefined reference to `WindowsDeleteString'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

 

I have tried the following to fix the error:

  • [DllImport("__Internal")] Metodes removed from IL2CPPLinkage class in the Platform.cs file
  • Search for "WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6" in the build output, but nothing found

2 Replies

Replies have been turned off for this discussion
  • Jacobitz's avatar
    Jacobitz
    Copper Contributor

    Ok so based on what I found out, QR-Code tracking on Meta Quest 3 is currently impossible, because access to the camera feed is prohibited by Meta.

    source: 
    - https://www.meta.com/help/quest/articles/getting-started/getting-started-with-quest-3/scan-qr-code/ 

    - https://communityforums.atmeta.com/t5/Talk-VR/Scan-QR-code-with-passthrough-camera/m-p/960682/highlight/true#M383797 

  • qasimsajid's avatar
    qasimsajid
    Copper Contributor

    spirit126 Were you able to solve this issue? I am facing the same error while building for Android using MRTK.

Resources