xlab / c-for-go

Automatic C-Go Bindings Generator for Go Programming Language
https://c.for-go.com
MIT License
1.5k stars 119 forks source link

handle recent go versions #151

Closed jstrachan closed 1 year ago

jstrachan commented 1 year ago

if I try the following on a recent go version (e.g. go1.20.2) I get:

go run main.go
# command-line-arguments
./main.go:80:19: undefined: NewProcess

this PR just moves the code from process.go into main.go to fix it so that go run main.go works

xlab commented 1 year ago

go run always been using only one file, not related to a new Go version. I am actually not sure if anyone runs real programs using go run, it was a shortcut to run scripts in Go, like, simple one-file scripts. The tool like c-for-go has to be built using go build or go install.