我的問題如下:我在機器上有一個二進制文件從那個二進制文件我需要編譯一個外部 .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}
- 3 回答
- 0 關注
- 238 瀏覽
添加回答
舉報
0/150
提交
取消