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
go version go1.17.11 darwin/amd64
OS macOS Big Sur 11.4
when I run
| =>cd bindings/x86/
| =>~/go/bin/c-for-go gen.yml
| => mv -v ./x86/*.| => go test.# github.com/andypeng2015/test/bindings/x86
./cgo_helpers.go:272:13: ref3fccfd0e.coalesced_mmio undefined (type *_Ctype_struct_kvm_coalesced_mmio_ring has no field or method coalesced_mmio)
./cgo_helpers.go:272:53: cannot assign [0]_Ctype_struct_kvm_coalesced_mmio to ref3fccfd0e.coalesced_mmio in multiple assignment
./cgo_helpers.go:298:108: x.ref3fccfd0e.coalesced_mmio undefined (type *_Ctype_struct_kvm_coalesced_mmio_ring has no field or method coalesced_mmio)
./cgo_helpers.go:402:13: refde42b52b.entries undefined (type *_Ctype_struct_kvm_cpuid has no field or method entries)
./cgo_helpers.go:402:39: cannot assign [0]_Ctype_struct_kvm_cpuid_entry to refde42b52b.entries in multiple assignment
./cgo_helpers.go:428:96: x.refde42b52b.entries undefined (type *_Ctype_struct_kvm_cpuid has no field or method entries)
FAIL github.com/andypeng2015/test/bindings/x86 [build failed]
FAIL
// code generated by c-for-go// from ~/Library/Caches/go-buildtype_Ctype_struct_kvm_coalesced_mmio_ringstruct {
first_Ctype___u32last_Ctype___u32
}
type_Ctype_struct_kvm_cpuidstruct {
nent_Ctype___u32padding_Ctype___u32
}
type_Ctype_struct_kvm_cpuid_entrystruct {
function_Ctype___u32eax_Ctype___u32ebx_Ctype___u32ecx_Ctype___u32edx_Ctype___u32padding_Ctype___u32
}
processing gen.yml ⠋[WARN] cannot gofmt x86/cgo_helpers.go: x86/cgo_helpers.go:239:82: expected operand, found '&&' (and 10 more errors)
andypeng2015
changed the title
C struct undefined (type *_Ctype_struct_xxx has no field or method xxx)
how to handle zero size array field in struct
Jun 22, 2022
go version go1.17.11 darwin/amd64
OS macOS Big Sur 11.4
when I run
source code attached
test.zip
pls advise, thanks
The text was updated successfully, but these errors were encountered: