Я пытаюсь реализовать простой .dll для моего проекта, который будет построен для приложения дополненной реальности HoloLens.Я пытаюсь просто вызвать функцию из моего C ++ .dll для реализации кода OpenCV, но в HoloLens выдает ошибку, показанную ниже.
.dll C ++ Code:
extern "C" void __declspec(dllexport) __stdcall test() {
return;
}
UnityКод C #:
internal class OpenCV
{
// Define the functions which can be called from the .dll.
[DllImport("Project1")]
internal static extern void test();
public static void testmeth()
{
test();
}
}
Ошибка при отладке на HoloLens с Visual Studio:
System.DllNotFoundException: 'Unable to load DLL 'Project1': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'
Здесь вы можете увидеть Настройки и Путь dll: