Hmm, previous suggestion to use '#cgo CFLAGS: -x c++' doesn't seem to work 
all the way. [I've only tested class declarations at the time.] Trouble is 
that '-x c++' is passed even when compiling the glue code, so that even 
glue symbols get decorated, which doesn't fly with linker at the end. I 
suppose the only way is to collect extern "C" declarations in a header 
file, include it in the 'import "C"' section, compile lib.cpp separately 
and link with it, e.g. with #cgo LDFLAGS: lib.o. Or make it a library and 
set LDFLAGS to '-L. -lname'...

-- 
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/5b5a1d04-79df-4b62-892e-5068bbb8423dn%40googlegroups.com.

Reply via email to