Re: XForms: Compiling Formdesigner code

Steve Lamont (
Thu, 28 Aug 97 06:56:19 PDT

To subscribers of the xforms list from (Steve Lamont) :

> Here is my reinvention of the wheel. It is a script that will compile
> any source code from the Xforms library. ...

And here's the wheel in the form of an Imakefile:

SRCS = try_main.c try_cb.c try.c
OBJS = $(SRCS:.c=.o)




xmkmf -a

or, if you're on a brain dead system where `xmkmf' doesn't accept the
`-a' argument, type

make depend

to create your Makefile, and then type


and your program will attempt to compile and link. `xmkmf' invokes
the `imake' program with the proper parameters.

Imakefiles, while they're a bit cryptic and difficult to understand
when you start out, are magnificent tools for developing portable X
(and other) programs.

`imake' knows where your X include files and X libraries live, so you
don't have to worry (as much) about going between platforms. I have
Imakefiles which work without a hitch on X11R5 and X11R6 and on Suns,
SGIs, and HP systems.

There is a very well written and useful reference written by Paul
DuBois called _Software Portability with imake_ (ISBN 1-56592-055-4).
It is published by O'Reilly and Associates, Inc.

> ... If it does not compile right
> then there are bugs. If there are no buggs then it will compile right.

Actually, if it doesn't compile right there are *syntax errors*.
Programs which are syntactically correct have been known to still
contain a bug or two. :-)

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: