HelloWorld Files Dissected

Now you’re going to take apart each of the files Glade created. First, start with the .c files to see how they fit together to make a complete program. After that, you will take a quick look at HelloWorld.glade to see how it is structured. Finally, you will get a quick word on autogen.sh.

main.c

Listing 5.3 shows the main.c file that’s created by Glade when the Build button is clicked. If a main.c file already exists, Glade will not overwrite it (as stated in the initial comment). In this case, to allow for a clean and quick compile from the command line, lines 28 and 29 were commented out after Glade wrote the file.

Listing 5.3. HelloWorld’s main.c
01 /* 
02  * Initial main.c file generated by Glade. Edit as required. ...

Get MySQL Building User Interfaces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.