Creating C # Bindings

I have a library written in C ++, how can I create bindings to C # so that I can present the functionality of this library in C #? And I don't mean “port” (possibly using SWIG). I mean that when calling some functions in C #, pure C ++ code is executed, so it runs quickly. I searched on google but found nothing o_O

Thank you in advance: -)

ps: Please note that I am a bit noob in C #

+3
source share
2 answers

Try to see if this helps. You can call unmanaged code from C #. This is not very difficult, but you need to keep in mind that you are running uncontrollable. Based on the background of C ++, this should not be too tough to keep in mind.

http://msdn.microsoft.com/en-us/magazine/cc301501.aspx

+1
source

I found a good library for creating C # bindings called CppSharp This library is a generator tool, here is a good starting point and tutorial https://github.com/mono/CppSharp/blob/master/docs/GeneratingBindings.md

+1
source

Source: https://habr.com/ru/post/1719533/


All Articles