in cgo doc i found: “When the Go tool sees that one or more Go files use the special import “C”, it will look for other non-Go files in the directory and compile them as part of the Go package. Any…”
so i moved my c code from go file preamble to an external c file
but when i “go run/build” it doesn’t find the functions in c file
what am I doing wrong? or what I did not understand
“go run main.go” or “go build main.go”, nothing special; it’s a try to use a c library from go (and it works very well inside the preamble), very very simple, very few lines of code