开发者

Creating C# bindings

i have a library written in C++, how can i create bindings to C# so i can expose the functionality of that library to C#? And i don`t mean "port" (using SWIG possibly). I mean that when calling some functions in C#, pure C++ code is executed so it is fast. I've searched around in google but i couldn't find anything o_O

Thanks in advance :-)

p.s.: please take into 开发者_运维百科notice, that i'm a bit noob in C#


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


Try looking here to see if this helps. You can call unmanaged code from C#. It's not terribly difficult but you need to keep in mind you're working unmanaged. Coming from a C++ background this shouldn't be too tough to keep in mind.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜