我正在尝试在我的Golang应用程序中使用。我的代码如下:C.free
package main
import (
"fmt"
"unsafe"
)
// #include <stdlib.h>
import (
"C"
)
//export FreeMemory
func FreeMemory(pointer *int64) {
C.free(unsafe.Pointer(pointer))
}
我做了一些搜索,我知道错误是因为我没有包括在内,但我有。stdlib.h
这是我的构建命令:。我在构建后得到的错误是:go build --buildmode=c-shared -o main.dllcould not determine kind of name for C.free
我的操作系统是视窗 10
谢谢
牛魔王的故事
相关分类