Go programming: How to get from cgo to exe
- by Kawili-wili
From a basic test program. . .
package main
/*
#include <stdio.h>
static void test() {
printf("hello world");
}
*/
import "C"
func main() {
C.test();
}
I do "cgo hello_cgo.go" and get:
_cgo_.o
_cgo_defun.c
_cgo_gotypes.go
hello_cgo.cgo1.go
hello_cgo.cgo2.c
How do I go about compiling from here to an exe?