1 Star 0 Fork 0

liming/go-study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cprint.go 174 Bytes
一键复制 编辑 原始数据 按行查看 历史
liming 提交于 2023-11-03 13:44 +08:00 . 2023.11.3
package main
//go 调用c
/*
#include <stdio.h>
*/
import (
"C"
"unsafe"
)
func main() {
cstr := C.CString("Hello world")
C.puts(cstr)
C.free(unsafe.Pointer(cstr))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liming0523/go-study.git
git@gitee.com:liming0523/go-study.git
liming0523
go-study
go-study
master

搜索帮助