webview / webview_go

Go language bindings for the webview library.
MIT License
176 stars 27 forks source link

not able to use go run #29

Closed benitogf closed 4 months ago

benitogf commented 4 months ago

I updated and now using go run fails:

# command-line-arguments
/usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: /tmp/go-link-598592747/000003.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

using go build and then running the binary still works tho

SteffenL commented 4 months ago

It looks like we need to link the dl library but I don't get this error on my end.

Can you please share the following?

benitogf commented 4 months ago

OS (ubuntu on WSL)

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

g++

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

go

go version go1.21.6 linux/amd64
SteffenL commented 4 months ago

I can reproduce this on a real Ubuntu installation with the same versions of software.

SteffenL commented 4 months ago

The fix works on my system so please check yours.

benitogf commented 4 months ago

yes that worked, thank you! 👏