sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.58k stars 268 forks source link

No longer compiles after go 1.15 released #245

Closed psiservices-scohen closed 3 years ago

psiservices-scohen commented 4 years ago

program stops compiling after 1.15 go release:

[sciter]$ go build

github.com/sciter-sdk/go-sciter

../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:110:145: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:141:85: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReadyAsync ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:151:120: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadFile ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:174:104: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadHtml ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:242:142: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCallback ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:296:60: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCSS ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:319:110: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetMediaType ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:330:96: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinWidth ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:339:106: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinHeight ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:359:48: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterCall ../../../go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.0/sciter.go:359:48: too many errors

pravic commented 4 years ago

A problem indeed but I haven't looked on Go 1.15 yet.

smallverse commented 4 years ago

...

hcharlie1201 commented 4 years ago

When will this be resolved?

pravic commented 4 years ago

Does anybody have any idea what is wrong with cgo in 1.15?

https://golang.org/doc/go1.15#compiler there's nothing specific but it's mentioned that multiple type conversions are forbidden.

Kukulkano commented 3 years ago

I have the same problem here. Went back to go 1.14.11 and there it works.

pravic commented 3 years ago

$ go version go version go1.15.5 windows/amd64

$ go get -x github.com/sciter-sdk/go-sciter

Works well. As well as go build in any example. Has it been fixed in 1.15.x?

pravic commented 3 years ago

Ah, #256 mentioned Linux. Will try.

pravic commented 3 years ago

Guys, #251 has been merged. Try now.

cristianadrielbraun commented 3 years ago

I think this is happening again on 1.16

kandeshvari commented 3 years ago

try to use master. Change in go.mod from

github.com/sciter-sdk/go-sciter v0.5.0

to

github.com/sciter-sdk/go-sciter master

and sync modules

immortalt commented 3 years ago

I think this is happening again on 1.16

I meet this problem again on go version go1.16.6 linux/amd64.