1 Motif Multi-Document Interface Version 1.0
 
   2 ------------------------------------------
 
   7 The Motif Multi-Document Interface (MDI) is a collection of C++ classes
 
   8 that emulates the behavior of the Multi-Document Interface in Microsoft
 
   9 Windows.  The MDI framework allows a user to view multiple documents (windows)
 
  10 constrained to a single parent window.
 
  16 The following are required to build MDI:
 
  26 The MDI package is known to compile on the following platforms:
 
  34    Linux 1.1.90 (gcc version 2.5.8)
 
  40 MDI is written in C++.  It does not use any language extensions like
 
  41 exceptions or templates, so it should compile with most C++ compilers.
 
  43 To build MDI, you need to set the name of your C++ compiler in the file
 
  44 "config/MDI.tmpl".  An attempt is made to pick a logical default for your
 
  45 machine, but if it fails, you will need to edit this file.
 
  47 After setting your compiler, just type:
 
  53 If successful, the MDI library (libXsw.a) will be created in the "lib"
 
  54 directory.  Additionally, a short test program (MDItest) will be created
 
  55 in the "test" directory.
 
  57 If you are not successful, see the "Possible Problems" section below.  I
 
  58 have had no luck with imake as it seems to only work on about 1/2 of the
 
  59 platforms I have tried.  If imake does not work, don't despair.  The MDI
 
  60 library is really simple to build by hand.  Just follow the following steps
 
  61 and it will work just fine.  I have given detailed instructions in the
 
  62 "Possible Problems" section below where I had problems using imake.  If
 
  63 anyone sees a problem with my Imakefile (I assume there are many), please
 
  66 In order to build the MDI package by hand, do the following:
 
  68    1. "cd" into the "lib" directory (cd lib)
 
  69    2. Compile all of the source code (CC -g -c *.C).  Your compiler
 
  70       name will vary.  Some common compilers are:
 
  71          CC:   SGI, Sun, Solaris, HP-UX
 
  75          gcc:  Most other platforms
 
  77    3. Create the library "libXsw.a" (ar rlv libXsw.a *.o)
 
  78    4. Run "ranlib" (not necessary on all machines)
 
  79    5. "cd" into the "test" directory (cd ../test)
 
  80    6. Compile the source code (see step #2 above)
 
  81    7. Link the test program (CC *.o -o MDItest ../lib/libXsw.a \
 
  82       -lXm -lXt -lX11).  Again, the compiler name will vary
 
  84 If you still can't get it to work after all of that, email me and I'll give
 
  92    Kept getting this message when trying to make:
 
  94       make: Fatal error: Don't know how to make target `XsComponent.o'
 
  96    I ended up building the library and test case with the following:
 
 103       CC -g -c *.C -I../lib
 
 104       CC -g *.o -o MDItest ../lib/libXsw.a -L/usr/lib -lXm -lXt -lX11      
 
 108    The generated Makefile had some unsupported options being passed to
 
 109    the linker.  I don't know what they were for, so I just removed them.
 
 110    All worked fine after that.
 
 114    I did not have "xmkmf" on this platform.  To build the library and test
 
 115    case, I did the following (paths may vary):
 
 118       CC -g -c *.C -I/usr/include/Motif1.2 -I/usr/include/X11R5
 
 121       CC -g -c *.C -I../lib -I/usr/include/Motif1.2 -I/usr/include/X11R5
 
 122       CC -g *.o -o MDItest ../lib/libXsw.a -L/usr/lib/Motif1.2 \
 
 123          -L/usr/lib/X11R5 -lXm -lXt -lX11 
 
 127    Running xmkmf on the top Makefile did not work.  Got the following:
 
 129       "./Imakefile", line 8.1: 1506-215 (E) Too many arguments
 
 130       specified for macro NamedTargetSubdirs.
 
 132    In order to build the library,  I cd'd into both the "lib" and "test"
 
 133    directory and did the following there:
 
 140    Kept getting this message when trying to make:
 
 142       Make: Don't know how to make XsComponent.o.  Stop.
 
 144    I ended up building the library and test case with the following:
 
 150       cxx -g -c *.C -I../lib
 
 151       cxx -g *.o -o MDItest ../lib/libXsw.a -lXm -lXt -lX11      
 
 155    "make Makefiles" did not work correctly.  Just cd'd into both the
 
 156    "lib" and "test" directories and type:
 
 161    Also, if you don't have the C++ library (libC.a), you will get some
 
 162    undefined symbols like when linking:
 
 164       ../lib/libXsw.a(XsComponent.o): Undefined symbol _cout
 
 165          referenced from text segment
 
 166       ../lib/libXsw.a(XsComponent.o): Undefined symbol
 
 167          ostream::operator<<(char const *) referenced from text segment
 
 169    To get rid of these errors, you will need to recompile the library
 
 170    (specifically XsComponent.C) with -DNDEBUG.  This will remove the calls
 
 171    to the <iostream> library and will eliminate the need to link with the
 
 178 All documentation is written in HTML and can be found in the "doc" directory.
 
 179 The top-most documentation file is "mdi.html"
 
 185 The latest version of MDI is available at:
 
 187    ftp://itimail.iti-oh.com/pub/project/sws/MDI-<version>.tar.gz
 
 188    ftp://itimail.iti-oh.com/pub/project/sws/MDI-<version>.tar.Z
 
 190 The MDI WWW page is located at:
 
 192    http://www.iti-oh.com/~sws/mdi.html
 
 198 Copyright (c) 1996  Scott W. Sadler
 
 201 See license conditions in the COPYRIGHT file of the MDI distribution
 
 207 Please report any bugs, suggestions or criticisms directly to me at the
 
 208 address below.  I want to make this as quality a software package as
 
 209 possible: stable, efficient and portable.  It is the feedback from the X
 
 210 community that makes writing the software worthwhile.
 
 214 http://www.iti-oh.com/~sws
 
 220 03-Mar-96   Version 1.0 Released