On Wed, Jul 24, 2024 at 5:29 AM 飞舟 <zev3...@gmail.com> wrote: > > I have a C struct, and when I use cgo to generate Go structs, some fields are > being ignored. I’m using go version go1.21.1 linux/amd64, and here is my env.
Please post code as plain text, rather than with a background. Plain text is much easier to read. Thanks. Also, please show us a complete, small, example. I tried your example. I had to invent types for J_COLOR_SPACE and ImageFormat. It worked fine. Does your actual code use anything like #pragma packed? That will cause this kind of problem, as Go does not currently have any way to represent a packed struct. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXGt_e0epyzLspXUZX3JSkw9THLXbezeVANTiN%2Bum1Thg%40mail.gmail.com.