我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

从 c 调用 Go 函数

I am trying to create a static object written in Go to interface with a C program (say, a kernel module or something).

I have found documentation on calling C functions from Go, but I haven't found much on how to go the other way. What I've found is that it's possible, but complicated.

Here is what I found:

Blog post about callbacks between C and Go

Cgo documentation

Golang mailing list post

Does anyone have experience with this? In short, I'm trying to create a PAM module written entirely in Go.

转载于:https://stackoverflow.com/questions/6125683/call-go-functions-from-c

近期文章

  • 在 Go 中使用 JSON Marshal 的小写 JSON 键名
  • 如何在 Ubuntu 精确版中安装 Go 的当前版本
  • 戈朗应用程序自动构建版本
  • 如何在围棋中使用 c + + ?
  • 无法下载,$GOPATH 未设置
  • @class vs. #import
  • 使用 JSON.unmarshal 和 JSON.newdecoder.decode 在 Golang 解码 JSON
  • 无法将数据(类型接口{})转换为类型 string: need 类型断言
  • 如何更新第三方软件包?
  • 如何使用 Go 实现 JSON 的美化打印?
  • 删除使用 go get 安装的包
  • 如何禁用文本选择突出显示?
  • 在 go 中键入转换接口的片
  • 如何使用 CSS 转换高度: 0到高度: 自动?
  • 戈朗-从地图上获得一个键的切片
  • 在进口声明前面加下划线在 Golang 意味着什么?
  • 如何垂直对齐图像内部的一个 div?
  • 是否有 CSS 父选择器?
  • 如何隐藏 UINavigationBar 1px 的底线
  • 如何按字母顺序排序 NSArray?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华