enter image description here
The blue box is my C struct, and the red box is the Go struct generated by cgo.
go version go1.21.1 linux/amd64
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3219558694=/tmp/go-build -gno-record-gcc-switches'
I want all the structs generated by cgo to be exportable.
New contributor
zev3691 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.