无法将 WinRT/C++ 组件加载到我的 UWP/C# 应用程序

Nei*_*rov 5 c# c++ c++-cx winrt-component uwp

我需要将 WebRTC c++ 库包装到 WinRT 组件中,并从我的 UWP/C# 应用程序中使用它。有一篇很好的文章how to use native c++ in uwp描述了我遵循的所有集成步骤。简要地:

  • 我已经创建了 Dll/C++DLL1库并链接了我的静态库libwebrtc_full.a。打了所有必要的电话
  • 然后,我在我的 WinRT/C++ 项目中引用了 DLLWindowsRuntimeComponent1MyClass成功创建了公共引用类,这使得所有必要的调用来自DLL1
  • 我的 UWP 应用程序正确App1查看MyClass及其公共方法,App1引用了 WindowsRuntimeComponent。

在运行应用程序时,只要我尝试使用在 WindowsRuntimeComponent1

The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Run Code Online (Sandbox Code Playgroud)

我创建并上传了一个示例项目以将我的问题重现到GDrivelibwebrtc.a在示例项目中也包含了我的静态数据,以防它是问题的根本原因。

我已经过上这样类似的问题去了,最相似的我的问题是这样的一个。不同之处在于我引用了该项目并且仍然得到相同的异常。

编辑1:

这是MyClass这样的:

namespace WindowsRuntimeComponent1
{
    public ref class MyClass sealed
    {
    public:
        MyClass(int sampleRate);
        virtual ~MyClass();

        void ProcessFrame(const Platform::Array<short>^ mic, const Platform::Array<short>^ speaker, const Platform::Array<short>^ output);

    private:
        void* p;
    };
}
Run Code Online (Sandbox Code Playgroud)

EDIT2:gflags App1.exe +sls按照评论中的建议运行,但我没有看到缺少什么依赖项。下面是带有堆栈跟踪的屏幕截图:

在此处输入图片说明