gotk3 / gotk3

Go bindings for GTK3
ISC License
2.11k stars 230 forks source link

I have some trouble with gtk3 #446

Closed liao725636367 closed 4 years ago

liao725636367 commented 5 years ago

i had use gotk3 for development. it works very well, but now there has some problem that bothers me. I can't share the compiled program to my friends and run it on his machine (he isn't programmer and don't know How to configure gtk3 development environment), can you help me how to solve this problem?

hfmrow commented 5 years ago

Hi, I don't think anyone can help you without more details about end-user issues ...

liao725636367 commented 5 years ago

i just want gtk-static library with golang

hfmrow commented 5 years ago

AppImage ?

Bios-Marcel commented 5 years ago

@hfmrow That has nothing to do with static compiling afaik :D

hfmrow commented 5 years ago

An appimage may include all necessary gtk libraries to run compiled program ... Sure it's not a static library.

Bios-Marcel commented 5 years ago

Well, it only works for linux systems running the app image deamon though. That's like not too many desktops on this planet :smile:

hfmrow commented 5 years ago

Your right, not enough desktop on linux, sadly ...

ghost commented 5 years ago

@hfmrow is right, appimages don't need a daemon, so they should work for this purpose. Other options: https://snapcraft.io/ https://flatpak.org/

If you know which distro your friend is using you can compile for it using a Linux container. The resulting binary will work on their system as long as they have GTK3 installed.

andre-hub commented 4 years ago

Maybe the above mentioned solutions were good and could help, otherwise I have the following: go build -ldflags "-linkmode external -extldflags -static" ...

Whereby this project uses the cgo interface and therefore a go standard functionality and the golang developers have already thought of something.