I need to wrap WebRTC c++ library into WinRT component and use it from my UWP/C# application. There is a good article how to use native c++ in uwp which describes all the integration steps, which I followed. Briefly:
- I have created Dll/C++
DLL1
library and linked my static librarylibwebrtc_full.a
. Made all necessary calls - Then, I referenced the DLL in my WinRT/C++ project
WindowsRuntimeComponent1
and created public ref classMyClass
successfully which makes all the necessary calls fromDLL1
- My UWP app
App1
seesMyClass
correctly and its public methods,App1
has reference to the WindowsRuntimeComponent.
When it comes to run the application, I am getting runtime exception as soon as I try to use one of the classes implemented in WindowsRuntimeComponent1
The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
I created and uploaded a sample project to reproduce my problem to GDrive I included my static libwebrtc.a
as well in the sample project in case if its the root cause of the problem.
I already went through the similar questions on SO and most similar to my problem is this one. The difference is that I am referencing the project and still get the same exception.
EDIT1:
This is how MyClass
looks like:
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;
};
}
EDIT2:
I ran gflags App1.exe +sls
as suggested in the comments, but I dont see what dependency is missing. Below is the screenshot with stack trace:
MyClass
" - That doesn't sound like C++/WinRT. What programming language are you really using? – TilloMyClass
which is CLR, I guess – Gorcock+sls
argument, could you please have a look into screenshot, I can not see which dependency is missing – Gorcock