C++ dll in hololens


I am working creating a hololens application using a native code dll based on c ++. The problem comes when I add it in the unity project (plugins / WSA / x86).

When generating the UWP solution in Visual Studio I get a failure of DllNotFound.

From what I have been able to read, it is necessary to create a UWP library to use it in my application. That library must contain my native code. The truth is that I'm not sure how to do that. Is there any way to stop my dll based on c ++ on a UWP dll ??

error: System.DllNotFoundException: Unable to load DLL 'nativoHololensPrueba.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).

enter image description here


  #include <iostream>
  #include <stdio.h>
  #include <memory>
  #include "Header.h"

int testo() {
return 10;

extern "C" {

    int testo();


public static extern int testo();

// Use this for initialization

public GameObject texto;

void Start () {
    texto.GetComponent<TextMesh>().text = "Cambiando el nombre " + testo();

enter image description here

asked on Stack Overflow Nov 2, 2017 by Urko Sanchez Ortiz • edited Nov 2, 2017 by Urko Sanchez Ortiz

1 Answer


I also had this and I solved it by compiling the dll on ARM64 (or ARM) with /MT flag.

answered on Stack Overflow Oct 28, 2020 by Eusebiu Marcu • edited Nov 2, 2020 by Eusebiu Marcu

User contributions licensed under CC BY-SA 3.0