What should i do if....

Q: I compile wafe or mofe with GhostView support and during linking
   "setenv" is reported as undefined.
A: Add the following lines somewhere at the begin of 
   wafe/lib/ghostview/Ghostview.c:

/* if compiled under wafe, the setenv implementation of Tcl can be used */
#ifdef GHOSTVIEW
#define setenv(name,value,bool) TclSetEnv(name,value)
#endif

========================================================================   
Q: I compile mofe with HTML support under SunOS 4.1.3, 
   and i get the following message during compilation of HTMLjot.c:
   "./inkstore.h", line 361: syntax error at or near type word "char"
   "./inkstore.h", line 361: unknown size
A: Your compiler does not accept "signed char"; set HTML_DEFINES
   in wafe/src/Imakefile to
   HTML_DEFINES         = -DHTML -Dsigned= -D_NO_PROTO

========================================================================
Q: For some strange reasons, lines starting with XCOMM appear in my
   Makefiles alter xmkmf.
A: According to the compatibility guide from the X Consortium comments
   in Imakefiles should be marked by the word XCOMM; normally, these
   lines are transformed in lines starting with the character '#' in
   the generated Makefiles. If you see lines in the Makefiles starting
   with XCOMM, please check you X configuration or alter these lines
   manually.

========================================================================
Q: I compile with XPM support and BUILD_XPM and obtain the following
   message during compilation of XtGen.c:
      cc -c -O   -I/usr/include -I.   -I../lib/XmGraph  -I../lib/xpm-3.4a/lib
      ...   -DXPM  ...  XtGen.c
      "XtGen.c", line 4065: XpmReturnInfos undefined
      "XtGen.c", line 4290: XpmReturnInfos undefined
      *** Error code 1
      make: Fatal error: Command failed for target `XtGen.o'
A: You have in your /usr/include directory xpm.h from an earlier
   XPM distribution. Either update xpm.h there or remove /usr/include
   from the front of the include paths.

========================================================================
Q: I compile with XPM support without BUILD_XPM (using a version of
   XPM already installed on my system) have the following problems
   during linkage:
      ld: Undefined symbol
      _XpmFreeXpmInfo
      _XpmFreeXpmImage
      _XpmReadFileToXpmImage
A: You are using an old version of XPM. The XPM implementation was
   altered recently, Wafe uses the new version. The easiest solution is
   to compile with BUILD_XPM defined in wafe/src/Imakefile.

========================================================================
Q: When I compile Xaw3d.3.1.2.src.tar.gz from ftp.wu-wien.ac.at 
   make aborts with the following message: 
   (cd ../lib/Xaw3d; /usr/bin/X11/xmkmf; make includes; make)
   mv Makefile Makefile.bak
   imake -DUseInstalled -I/usr/lib/X11/config
   make: Fatal error in reader: Makefile, line 439: Unexpected end of line seen
A: You need X11R5 or better to compile the newer Xaw3d versions.  An
   X11R4 based Xaw3d should be available from ftp.x.org.  If you have
   the X11R5 libraries, include files and binaries on your machine,
   and you still get this message, be sure, that the X11R5 binary
   directory is in front of your search path and that the variable
   CONFIG_DIR_SPEC in the X11R5 shell script "xmkmf" points to the
   X11R5 config directory.

========================================================================
Q: I am starting a wafe application (wafemc) and instead of a graphical user 
   interface, messages like the following appear on my screen:

   %echo [getChannel] $WAFEVERSION: $XVERSION $PACKAGES
   %set FILESEARCHPATH /usr/lib/X11/wafe/%T/%N:/usr/lib/X11/wafe/faces/%N:/usr/include/X11/%T/%N:%N
   %sV topLevel iconPixmap wafe.xbm
   %mergeResources topLevel  *foreground  black  *shadowWidth 0
   % proc deleteWindowProtocol {cmd} { setWMProtocols topLevel WM_DELETE_WINDOW; action topLevel override "<Message>WM_PROTOCOLS: exec($cmd)" }
   ...
A: you are executing wafemc and not xwafemc.
   It should be possible now to run this progam in the following ways:
    -  xwafemc  (as suggested in the install file (note the leading "x".
                 wafemc will be executed as a subprocess of wafe)
    -  wafe --p wafemc
                (same as above, but more explicit)
    -  wafemc -P
                (wafe will be executed as a subprocess of perl ("Perl 
                 on top")
                this allows to use stdin and stdout of perl freely to
                run for example a perl debugger)

========================================================================
Q: I am starting the Motif version of wafe and it displays the following
   message during startup:

   Warning: Representation size 2 must match superclass's to 
            override marginWidth

A: be sure that you use the correct Motif include and libsl all Motif
   specific packages (such mtree, HTML, XmGraph, Xbae) must be compiled
   with the same version of Motif.

========================================================================
Q: I am trying to compile the Xbae widgets under Motif 2.0, and 
   get error messages about undefined references Max and Min.

A: Change the test 

#if XmVersion == 1002
#define Max(x, y)       (((x) > (y)) ? (x) : (y))
#define Min(x, y)       (((x) < (y)) ? (x) : (y))
#endif

  to 

#if XmVersion >= 1002
#define Max(x, y)       (((x) > (y)) ? (x) : (y))
#define Min(x, y)       (((x) < (y)) ? (x) : (y))
#endif

  and recompile.
