'Using Tk with C
I’m a C programmer with no desire to deal with C++ tool-kits, and I’m trying to build a simple graphical card game. I’m programming under Linux, but I’d like to have the option of a Windows port. From what I’ve read, my options are GTK+ and Tk.
I’m working through some GTK+ tutorials, and I’ll probably stick with that, but I don’t think I’m giving Tk a fair shot. Trouble is, all the Tk documentation I can find is either for using Tk with {Tcl, Ruby, Perl, Python}, or for embedding a Tcl interpreter into the C program and using Tk that way. Is there an easy(-ish) way to use Tk to build GUIs for a C program without digressing too much into Tcl?
Ideally, is there a tutorial (something along the lines of the TkDocs Tk Tutorial) but using something like the Tk C API?
Solution 1:[1]
Solution 2:[2]
Here's a reference: http://www.hume.com/html85/indexes/tkc_api.html
Intro to combine C with Tk: http://davesource.com/Fringe/.../tcl_tk/tcl_C.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Remo.D |
| Solution 2 |
