I have a cgo program:
package main
//#define sum(a,b) (a)+(b)
import "C"
func main() {
print(C.sum(1,2))
}
It should be very straight forward and print 3. But compilation failed:
could not determine kind of name for C.sum
As limited documentation I found with cgo and after some test, cgo works with macro constants, but how can I get it work with macro functions/arguments?