vi a.go

1 package main
2 import fmt "fmt"
3 func main(){
4 fmt.Println("hello world")
5 }

编译:

  $ 6g a.go  # 编译; 输出 a.6
  $ 6l a.6   # 链接; 输出 6.out
  $ 6.out
第二种方法:
sudo apt-get install gccgo安装gccgo
gccgo a.go->生成a.out

相关文章:

  • 2021-08-26
  • 2021-11-29
  • 2022-01-15
  • 2021-05-04
  • 2021-10-15
  • 2021-07-30
  • 2021-07-22
  • 2022-12-24
猜你喜欢
  • 2022-03-01
  • 2021-06-25
  • 2021-08-22
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案