go-gtk icon indicating copy to clipboard operation
go-gtk copied to clipboard

after building to a binary file ,can not work on other computer

Open JackySmith opened this issue 6 years ago • 3 comments

just a easy gtk program, after build it to a execute file ,can work well on my mac which I build it ,but when i transfer the other mac, it can not work and relay as follows:

dyld: Library not loaded: /usr/local/opt/gtk+/lib/libgtk-quartz-2.0.0.dylib Referenced from: /Users/bigdisk/Desktop/testgtk Reason: image not found Abort trap: 6 logout

it seems that some lib not included ,how can i build it with that lib

JackySmith avatar Aug 24 '18 13:08 JackySmith

Since your gtk libraries are not compiled as static library.

mattn avatar Aug 24 '18 15:08 mattn

Thanks for you reply. And I google and found that : GTK+ does not officially support static linking. If you want to statically link GTK+, you will need to build it (and all its dependencies) from scratch as static libraries . Is that true? But I don't know how to build it from scratch as static libraries .Can you give me some useful manual?

JackySmith avatar Aug 26 '18 13:08 JackySmith

Is that true?

Yes. See https://www.geany.org/manual/gtk/gtk/gtk-building.html

You can modify flags for configure script to build static library.

mattn avatar Aug 26 '18 14:08 mattn