1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00

example: cgo生成中间文件的例子

This commit is contained in:
chai2010 2018-04-25 17:39:38 +08:00
parent a0f2e550f8
commit fe604df575
5 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
# License: https://creativecommons.org/licenses/by-nc-sa/4.0/
default: clean
# ignore nocgo_*.go files
go tool cgo main.go hello.go
clean:
-rm -rf ./_obj

View File

@ -0,0 +1,6 @@
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
package main
import "C"

View File

@ -0,0 +1,8 @@
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
package main
import "C"
func main() {}

View File

@ -0,0 +1,4 @@
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
package main

View File

@ -0,0 +1,4 @@
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
package main