[Instructions] [Search] [Current] [News] [Syllabus] [Glance] [Links] [Handouts] [Outlines] [Labs] [Assignments] [Exams] [Examples] [Project]
Back to Types: Typedefs, Enums, Structs, Unions, and Arrays. On to Pointers.
Held Monday, February 7, 2000
Overview
Today we consider two important practical issues for the
development of C programs: header files, which
provide specifications for C libraries, and make,
which supports some forms of automatic recompilation.
Notes
http://www.gnu.org/
http://sourceware.cygnus.com/cygwin/.
Contents
Summary
make
.h.
make
make, you must create a command file
for make (typically called Makefile)
thing-to-make: things it depends on instructions for making the thing
chat that
we plan to build from three files: server.c,
client.c and chat.h.
.o files first.
chat: server.o client.o gcc -o chat server.o client.o server.o: server.c chat.h gcc -c server.c client.o: client.c chat.h gcc -c client.c
make by typing make at
the Unix command line.
weekdays.h that defines an enumerated type,
weekday.
weekdays.c that provides appropriate
utilities for weekday, such as a function to convert
a weekday to the corresponding string.
printdays.c that prints the days
of the week in order (both the code and the name), using a for loop.
make.
weekdays.c (using the touch command)
to update the ``last changed'' attribute.
make to see what happens.
weekdays.h and make again.
Thursday, 20 January 2000
Monday, 7 February 2000
Back to Types: Typedefs, Enums, Structs, Unions, and Arrays. On to Pointers.
[Instructions] [Search] [Current] [News] [Syllabus] [Glance] [Links] [Handouts] [Outlines] [Labs] [Assignments] [Exams] [Examples] [Project]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS364/2000S/Outlines/outline.07.html
Source text last modified Mon Feb 7 14:01:41 2000.
This page generated on Mon Feb 7 14:00:38 2000 by Siteweaver. Validate this page's HTML.
Contact our webmaster at rebelsky@grinnell.edu