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
/*int test1() {}struct test2 { unsigned int ncpus; int epoch_number; int netmap_extra_bufs;}; */import"C"funcmain() {
C.test1()
vartest C.test2_=test
}
result:
go run main.go./main.go:18:11: could not determine kind of name for C.test2
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
I want to build and run it correctly.
What did you see instead?
go run main.go./main.go:18:11: could not determine kind of name for C.test2
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
When building cgo, I get an error 'could not determine kind of name for var'
cmd/cgo: When building cgo, I get an error 'could not determine kind of name for var'
Feb 21, 2018
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.4 freebsd/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
main.go ( https://play.golang.org/p/HrkbEQRd670 )
result:
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
I want to build and run it correctly.
What did you see instead?
The text was updated successfully, but these errors were encountered: