ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm learning C, but I'd rather take the jump to learn how to program GUI apps in C. I've tried out programming in C (just a simple Hello World app) with Glade, and I discovered that it is vastly different to standard ANSI C. My questions is: what is the difference between the two, and which should I learn?
I'm also looking for a lengthy tutorial on using Anjuta or Glade for C (GTK+) development. So far, I have managed to find Starting off in Glade/GTK+ and Learning to use Glade/Learning to use Anjuta, but none of them are long enough to be useful. I have stumbled across the GTK.org Tutorial, but in that it is coding the entire application (instead of doing the layout visually). I'm just looking for some guidelines, because I would really love to learn how to program GNOME applicatoins in C. Thanks in advance,
Gnome and GTK based applications rely heavily on other libraries and operating specific extensions. Both build upon the GDK library which encapsulates the X Windows system beautifully. These libraries also use GLIB (not to be confused with glibc) which makes lots of the coding for different platforms easier. It redefines many of the methods provided by the standard C library and redefines the standard types. Moreover, GLIB provides popular data structures such as linked lists, trees, pointer arrays, etc. which makes development easier in C. ANSI C does not offer standard GUI development, so any GUI programming with C will be platform specific.
naf - Thank you for clearing that up. And how would you suggest learning to code GNOME apps in C (using GLIB and the other libraries)? As I said, I only learned some basic stuff in those tutorials (like g_print, gtk_label_set_text and the like), and the other one was just the full whack - no GUI manipulation. So I'm basically looking for a tutorial which is similar to an extention of those simpler ones. Thanks!
Now this is just my opinion. Eveyone learns differently, but perhaps you would be better off learning C first and then introduce yourself to those libraries. In particular, you should be familiar with memory allocation, file I/O, structures, typedefs, pointers (to data and functions), macros and enumerations. At which point, follow the GTK tutorial again (and you will understand it better).
naf - that is probably a better idea, you're right. I actually have K&R right next to me (and I recently ordered an 'Objective C' book, which I'm hoping will be good!), so I'll get going with that! I already have a fair base in C, but nowhere near professional - just the basics. Oh well, thanks for your reply!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.