mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-11 12:49:06 +01:00
17 lines
230 B
Go
17 lines
230 B
Go
package foo
|
|
|
|
/*
|
|
#cgo LDFLAGS: -lmy-c-lib
|
|
|
|
#include "my-c-lib.h"
|
|
#include <stdlib.h>
|
|
*/
|
|
import "C"
|
|
import "unsafe"
|
|
|
|
func MyHello(msg string) {
|
|
c_msg := C.CString(msg)
|
|
defer C.free(unsafe.Pointer(c_msg))
|
|
C.my_c_hello(c_msg)
|
|
}
|