sciter-sdk / go-sciter

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

Click Me button does nothing in callback example #330

Open vikulin opened 2 years ago

vikulin commented 2 years ago

Click Me button does nothing in callback example:

Configuration:

vadym@ubuntu:~/go-sciter/examples/callback$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vadym/.cache/go-build"
GOENV="/home/vadym/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/vadym/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/vadym/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/vadym/go-sciter/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3178077507=/tmp/go-build -gno-record-gcc-switches"

go.mod:

vadym@ubuntu:~/go-sciter/examples/callback$ cat ../../go.mod 
module examples/simple

go 1.17

require (
    github.com/GeertJohan/go.rice v1.0.2
    github.com/lxn/win v0.0.0-20210218163916-a377121e959e
    github.com/sciter-sdk/go-sciter v0.5.1-0.20220216200553-99cd4de65a26
)

require (
    github.com/daaku/go.zipexe v1.0.0 // indirect
    golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13 // indirect
)

Checked in Ubuntu 20: 2022-02-17_14h19_36

Windows 10:

2022-02-17_14h19_15

and MacOS 12.2.1: 2022-02-17_14h28_18

Corresponding cross-compilation commands were done as well:

vadym@ubuntu:~/go-sciter/examples/callback$ GOOS=windows CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build -ldflags="-H=windowsgui"
vadym@ubuntu:~/go-sciter/examples/callback$ sudo /usr/bin/env PATH=$PATH:/usr/local/go/bin:/home/vadym/osxcross/target/bin CC=/home/vadym/osxcross/target/bin/o64-clang CXX=/home/vadym/osxcross/target/bin/o64-clang++ GOOS=darwin CGO_ENABLED=1 go build
vikulin commented 2 years ago

Finally I determined what was the problem: when I use https://github.com/c-smile/sciter-js-sdk/archive/refs/heads/main.zip sciter.dll it does not work but this works well: https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll and https://sciter.com/sdk/sciter-sdk.zip

xiaobai-6011 commented 1 year ago

@vikulin I'm also experiencing this problem

xiaobai-6011 commented 1 year ago

@vikulin Thank you for using this version normally.