Go 1.5+ : Error - imports runtime: C source files not allowed when not using cgo or SWIG

后端 未结 4 969
情书的邮戳
情书的邮戳 2021-02-07 03:07

My program was building perfectly with go 1.4.2. After installing go 1.5, I am getting following error.

imports runtime: C source files not allowed when n

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 03:37

    I experienced this issue within my editor (sublime text 2). I call go build upon saving, it would appear my editor was pointing to go 1.4.x rather than the newly installed 1.5.

    • I solved this by simply quitting and reopening my editor.

提交回复
热议问题