Go programming: How to get from cgo to exe
Posted
by Kawili-wili
on Stack Overflow
See other posts from Stack Overflow
or by Kawili-wili
Published on 2010-05-07T01:51:05Z
Indexed on
2010/05/07
1:58 UTC
Read the original article
Hit count: 316
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?
© Stack Overflow or respective owner