visualfc / atk

Another Golang Tcl/Tk binding GUI ToolKit
GNU Lesser General Public License v2.1
97 stars 19 forks source link

tk/interp: use pkg-config on linux #13

Closed r-ricci closed 3 years ago

r-ricci commented 3 years ago

On my distribution (Void Linux), go get -u github.com/visualfc/atk/tk gives the error:

# github.com/visualfc/atk/tk/interp
/bin/ld: cannot find -ltcl
/bin/ld: cannot find -ltk
collect2: error: ld returned 1 exit status

This is because on some systems the libraries are called tcl8.6 and tk8.6. Using pkg-config (documented here) fixes the problem. I don't know if it works on darwin too, if so you could simplify the code by using only that directive for all unix systems.