如何使用 GO 导入用 C 编写的 DLL 函数? [英] how to import a DLL function written in C using GO?

查看:24
本文介绍了如何使用 GO 导入用 C 编写的 DLL 函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个示例代码,该代码如何从用 C 编写的 dll 中导入函数.相当于 C#.NETDllImport.这是可能的?我正在使用窗户.任何帮助表示赞赏.提前致谢.

I'm looking for an example code how import a function from a dll written in C. equivalent to DllImport of C#.NET. It's possible? I'm using windows. any help is appreciated. thanks in advance.

推荐答案

您想使用 cgo.这里是介绍.

这篇关于如何使用 GO 导入用 C 编写的 DLL 函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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