Use this compiler command if you want Motif1.2 widgets and X11 R5.
cc -I/usr/include/Motif1.2 -I/usr/include/X11R5 -o<file> <file.c> -L/usr/lib/Motif1.2 -L/usr/lib/X11R5
Note: above command is all on one line.
To save typing, you can either incorporate the above into a Makefile, or add these options into the environment variable CCOPTS. You will also need to "link in" the libraries for X11 with -l options.
NOTE: When compiling things with X11/Motif libraries, the following error message might happen (and be mentioned several times):
<Include file name>: ###: too much defining - use -H option
The C Preprocessor only allocates a certain amount of space for #define statements. You must tell the C Preprocessor to allocate more room for #define statements. You do this by adding the following into your 'cc' options (either on the command line or in the makefile):
-Wp,-H200000
This will tell the C compiler to tell the C Preprocessor to allocate room for 200,000 #define statements. You may have to adjust this number accordingly. More info can be obtained by seeing the man pages for 'cpp'.
/LINKS/contrib/lib/X11
/LINKS/contrib/include/X11
NOTE THAT THESE ARE NOT SUPPORTED - USE AT YOUR OWN RISK!
e.g. find /usr -name Xm.h -print
(this will locate the path for Xm.h)