bcmills:~$ go build cgocallback
could not determine kind of name for C.go_print_hello
As a workaround, I can add an explicit forward-declaration of the Go function to the C preamble:
Given that cgo (presumably) already knows the C declarations for the functions it is exporting, I would prefer that it emit those forward-declarations itself. Since all C types should be defined by the end of the user-defined preamble, it seems like cgo could emit the forward declarations immediately following the preamble.
(If user code needs to refer to the Go functions within the preamble itself, requiring an explicit forward-declaration seems reasonable.)
bcmills:~$ go version
go version devel +2bbfa6f746 Thu Mar 9 15:36:43 2017 -0500 linux/amd64
The text was updated successfully, but these errors were encountered: