如何使用C#Invoke Boost [英] How to use the c# Invoke Boost

查看:220
本文介绍了如何使用C#Invoke Boost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#Invoke Boost?

How to use the c# Invoke Boost?

推荐答案

为什么要使用? Boost是一个C ++库.您将在C ++中使用它.如果要在C#中使用它,可以编写一个可以从C#调用的C ++/CLI dll,但是除非您已经在使用C ++,否则这似乎是一种奇怪的处理方式.您将无法直接访问Boost库,只能访问您编写的托管方法,这可能会暴露该功能.
Why would you want to ? Boost is a C++ library. You''d use it in C++. If you wanted to use it in C#, you''d write a C++/CLI dll that could be called from C#, but unless you''re working with C++ already, it seems like an odd way to do things. You''d get no direct access to Boost libraries, only access to managed methods you write, which could expose the functionality.


对于C#,要使用任何非托管模板类或函数,它需要通过DLL导出.而且您不能从DLL导出通用模板类或函数.导出时,必须指定一种类型.您可能已经注意到,所有可用的模板库都在源代码中.
For C# to use any unmanaged template class or function, it has to exported via a DLL. And you cannot export a generic template class or function from a DLL. When exporting you have to specify a type. As you may have noticed, all template libraries available are in source code.


这篇关于如何使用C#Invoke Boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆