You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import"C"import"fmt"funcmain() {
varcp*C.ucharvargop*uint8=cpfmt.Println(gop)
varcarr [1]C.ucharvargoarr [1]uint8=carrfmt.Println(goarr)
}
Trying to run it:
./main.go:9: cannot use cp (type *C.unsignedchar) as type *uint8 in assignment
./main.go:13: cannot use carr (type [1]C.unsignedchar) as type [1]uint8 in assignment
If I run go tool cgo -godefs it generates a Go file that looks and runs fine: