3
從基本的測試程序。 。 。如何從cgo到exe
package main
/*
#include <stdio.h>
static void test() {
printf("hello world");
}
*/
import "C"
func main() {
C.test();
}
我願意 「CGO hello_cgo.go」 並獲得:
_cgo_.o
_cgo_defun.c
_cgo_gotypes.go
hello_cgo.cgo1.go
hello_cgo.cgo2.c
如何去編譯從這裏到一個exe?
謝謝!這工作。欣賞快速反應。 – 2010-05-07 02:26:13