我如何使用&QUOT调用C从围棋;外国功能界面与QUOT; [英] How do I call C from Go using the "foreign function interface"

查看:131
本文介绍了我如何使用&QUOT调用C从围棋;外国功能界面与QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何使用Go的外国功能界面来调出C函数?

How do I use Go's "foreign function interface" to call out to a C function?

此接口的 FAQ 提及,但我不能看到它的文档提到其他地方。

This interface is mentioned on the FAQ, but I cannot see it mentioned elsewhere in the docs.

推荐答案

检查出的从转到库中的文件。它显示了如何包装在一个围棋C库,并有讲解过程中相当多的意见。

Check out this file from the Go repository. It shows how to wrap a C library in Go and has quite a few comments that explain the process.

这篇关于我如何使用&QUOT调用C从围棋;外国功能界面与QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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