Dear community,

what is wrong with the following simple code, which yields "undefined 
reference for F" ?


file f.go:

package main
// #include "f.h"
// void f (int a) { F(a) }
import "C"

func F(a int) { println(a) }
func main() { C.f(7) }


file f.h:

extern void F (int a);

//export F


Thanks in advance for any help,
Christian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e31defe4-fde3-47c5-b052-8979939257a2%40googlegroups.com.

Reply via email to