go - 无法为共享对象编译插件
问题描述
看起来我的问题是 GoLang 在插件中包含运行时,因此它们无法共享。我做了
go install -buildmode=shared std
然后我尝试将我的插件编译为共享:
go build -buildmode=plugin -linkshared /tmp/code_SUM.go
# command-line-arguments
runtime.islibrary: missing Go type information for global symbol: size 1
我的代码
# cat /tmp/code_SUM.go
package main
import (
"fmt"
)
func SUM(x int, y int) int { fmt.Println("")
return x+y}
是否有任何解决方法或某种方法来修补/更改 Go 编译器/语言以使我的程序发生?
解决方案
推荐阅读
- reactjs - react-table 单元格链接不呈现组件
- javascript - 为什么我不能在 yarn add 中添加 postgresql pg?
- flutter - 创建 AppBar 作为类颤振
- c# - .net core web api 控制器生命周期
- typescript - 是否可以使用 Compiler API 推断函数参数类型?
- wordpress - wordpress中每个帖子选项的动态标题更改
- javascript - React 应用过滤海量数据集并基于它渲染地图
- operators - Is there any way to take at first the arguments and at last the name in a function in racket?
- python - 如何限制块功能?
- c# - WaitForSeconds 立即触发