You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
280 B
Go
24 lines
280 B
Go
8 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
/*
|
||
|
#cgo CFLAGS: -x objective-c
|
||
|
#cgo LDFLAGS: -framework AppKit
|
||
|
#include "procmon.h"
|
||
|
*/
|
||
|
import "C"
|
||
|
|
||
|
//export TheGoFunc
|
||
|
func TheGoFunc(name string) {
|
||
|
fmt.Printf("hi from c: %s\n", name)
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
C.TheCFunc()
|
||
|
runtime.Goexit()
|
||
|
}
|