【发布时间】:2019-02-05 20:53:00
【问题描述】:
我正在尝试为我的项目实现一个简单的 .dll,该项目将为 HoloLens 增强现实应用程序构建。我试图简单地从我的 C++ .dll 调用一个函数来实现 OpenCV 代码,但在 HoloLens 上它会引发如下所示的错误。
.dll C++ 代码:
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();
}
}
使用 Visual Studio 在 HoloLens 上进行调试时出错:
System.DllNotFoundException: 'Unable to load DLL 'Project1': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'
【问题讨论】:
标签: c# c++ unity3d dll hololens