I have a piece of cgo code which doesn't do much, but links a lot of libraries in. As far as I can tell all my includes are there and they shouldn't stomp on each other (they don't when compiled in C), however with cgo I get the following weirdness:
$ go build # mypkg Undefined symbols for architecture x86_64: "___DARWIN_NULL", referenced from: __cgohack___DARWIN_NULL in _cgo_main.o (maybe you meant: __cgohack___DARWIN_NULL) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) If I decide to be bold and #define __DARWIN_NULL in my Cgo preamble (before "import C"), I get the following: $ go build # mypkg ./main.go:53:9: warning: '__DARWIN_NULL' macro redefined [-Wmacro-redefined] /usr/include/sys/_types.h:52:9: note: previous definition is here I'm a little bit stumped. How to debug the chain on #includes to get to the bottom of this? Why is this not a problem elsewhere? -- 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. For more options, visit https://groups.google.com/d/optout.