To compile a Motif program we have to link in the Motif, Xt and Xlib libraries. To do this use: -lXm -lXt -lX11 from the compiler command line. NOTE: The order of these is important.
Our push.c program is written with ANSI style function calls (in keeping with the C Course we did last term). In order to use K &R style that Motif employs we must also use the -common option of the c89 compiler.
Other Compiler options can be tagged on as usual.
So to compile our push.c program we should do:
c89 push.c -o push -common -lXm -lXt -lX11