1

add cgo example; fix zig url

This commit is contained in:
2021-06-07 22:33:34 +03:00
committed by Motiejus Jakštys
parent 5daa23e987
commit 5860621c80
4 changed files with 19 additions and 1 deletions

View File

@@ -11,3 +11,5 @@ cc_binary(
name = "exception",
srcs = ["exception.cpp"],
)
# go build -ldflags "-linkmode external -extldflags -static" hello.go

9
test/hello.go Normal file
View File

@@ -0,0 +1,9 @@
package main
// #include <stdio.h>
// void helloworld() { printf("hello, world\n"); }
import "C"
func main() {
C.helloworld()
}