我的问题是:
- 我的机器上有一个围棋二进制程序
- 我需要从该二进制文件编译一个外部.go文件
- 编译后,我需要将编译后的go文件链接到当前二进制文件中,以便使用刚刚编译的go代码.
你觉得有可能吗?
我做了一些研究,但这似乎是不可能的,但我可能忽略了一些东西.
谢谢:)
第一个GO二进制文件将包含如下内容
func main() {
// Here I need to compile an external go file (or package) which contains
// The definition of runFoo()
// Once the file/package is compiled and linked I need to call the compiled code
runFoo()
// Continue the execution process normally here
}