Go編譯緩存導致C文件修改後未重新編譯

今天和同事一起看了一個很詭異的問題,研究了半天發現是由於Go的編譯緩存導致的,記錄下來方便其他遇到問題的同學參考。 首先編寫一個hello.go文件,裏面調用了C函數: package main /* #include "./libhello.c" */ import "C" import "fmt" func main() { fmt.Println(C.hello()) } 對應的
相關文章
相關標籤/搜索