自动换行c ++ dll到c#
我想在c#项目中使用c ++库。是否有自动导入所有类的包装工具?
I want to use c++ library in a c# project. Is there any wrapper tool to import all classes automatically?
SWIG 可以帮助创建由两个部分组成的包装器,一个C ++边和一个C#边。
它需要一些工作来设置正确的生成文件。
SWIG can help create a wrapper consisting of two parts, one C++ sided, and one C# sided.
It needs a bit of work to set up the correct generation files though.
需要更多手动编码的替代方法是C ++ / CLI。
An alternative that requires more manual coding is C++/CLI.
apis我喜欢p /调用任何一个。有一个程序来自动转换c头。如果我记得正确,它叫做P / Invoke Interop Assistant或Interop Signature Toolkit。
For pure c apis I prefer p/invoke over either of them. There is a program to automate conversion of c headers. If I recall correctly it's called something like "P/Invoke Interop Assistant" or "Interop Signature Toolkit".
还有 mono / cxxi 看起来很酷。