this post was submitted on 25 Jun 2023
4 points (100.0% liked)
Ask Experienced Devs
1233 readers
2 users here now
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not an easy task, but if your C++ library is DLL you can use interop to load and use it on C#. If the library is larger than just one DLL, then it goes even harder. https://learn.microsoft.com/en-us/dotnet/framework/interop/consuming-unmanaged-dll-functions
Thank you for the response. To be honest, I'm a bit surprised that this is not an easy task. If I understand the documentation correctly, that means, I will have to create a C# wrapper for C++ methods. I was hoping to get the wrapping for free via some tooling. I found Emscripten that looks promising (for JS), but not sure that's any different.
You can do this with Emscripten. See here and here
Thank you. I saw those pages, but what I can do was not immediately clear. I was looking for some examples (probably there are some videos on YouTube). I will have some more time to dive into this soon. Maybe I'll hack around and see if it works for me.