Motif Multi-Document Interface Version 1.0 ------------------------------------------ INTRODUCTION ============ The Motif Multi-Document Interface (MDI) is a collection of C++ classes that emulates the behaviour of the Multi-Document Interface in Microsoft Windows. The MDI framework allows a user to view multiple documents (windows) constrained to a single parent window. REQUIREMENTS ============ The following are required to build MDI: C++ compiler X11R5/X11R6 Motif1.2 PLATFORMS ========= The MDI package is known to compile on the following platforms: SGI IRIX 5.2 SunOS 4.1.3 Sun Solaris 5.4 HP-UX 9.05 AIX 4.1 Alpha/OSF1 v3.2 Linux 1.1.90 (gcc version 2.5.8) INSTALLATION ============ MDI is written in C++. It does not use any language extensions like exceptions or templates, so it should compile with most C++ compilers. To build MDI, you need to set the name of your C++ compiler in the file "config/MDI.tmpl". An attempt is made to pick a logical default for your machine, but if it fails, you will need to edit this file. After setting your compiler, just type: xmkmf make Makefiles make If successful, the MDI library (libXsw.a) will be created in the "lib" directory. Additionally, a short test program (MDItest) will be created in the "test" directory. If you are not successful, see the "Possible Problems" section below. I have had no luck with imake as it seems to only work on about 1/2 of the platforms I have tried. If imake does not work, don't despair. The MDI library is really simple to build by hand. Just follow the following steps and it will work just fine. I have given detailed instructions in the "Possible Problems" section below where I had problems using imake. If anyone sees a problem with my Imakefile (I assume there are many), please let me know. In order to build the MDI package by hand, do the following: 1. "cd" into the "lib" directory (cd lib) 2. Compile all of the source code (CC -g -c *.C). Your compiler name will vary. Some common compilers are: CC: SGI, Sun, Solaris, HP-UX xlC: AIX RS/6000 cxx: Alpha/OSF1 g++: Linux gcc: Most other platforms 3. Create the library "libXsw.a" (ar rlv libXsw.a *.o) 4. Run "ranlib" (not necessary on all machines) 5. "cd" into the "test" directory (cd ../test) 6. Compile the source code (see step #2 above) 7. Link the test program (CC *.o -o MDItest ../lib/libXsw.a \ -lXm -lXt -lX11). Again, the compiler name will vary If you still can't get it to work after all of that, email me and I'll give you a hand. POSSIBLE PROBLEMS ================= SunOS 4.1.3 Kept getting this message when trying to make: make: Fatal error: Don't know how to make target `XsComponent.o' I ended up building the library and test case with the following: cd lib CC -g -c *.C ar rlv libXsw.a *.o ranlib libXsw.a cd ../test CC -g -c *.C -I../lib CC -g *.o -o MDItest ../lib/libXsw.a -L/usr/lib -lXm -lXt -lX11 Solaris 5.4 The generated Makefile had some unsupported options being passed to the linker. I don't know what they were for, so I just removed them. All worked fine after that. HP-UX 9.05 I did not have "xmkmf" on this platform. To build the library and test case, I did the following (paths may vary): cd lib CC -g -c *.C -I/usr/include/Motif1.2 -I/usr/include/X11R5 ar rlv libXsw.a *.o cd ../test CC -g -c *.C -I../lib -I/usr/include/Motif1.2 -I/usr/include/X11R5 CC -g *.o -o MDItest ../lib/libXsw.a -L/usr/lib/Motif1.2 \ -L/usr/lib/X11R5 -lXm -lXt -lX11 AIX 4.1 Running xmkmf on the top Makefile did not work. Got the following: "./Imakefile", line 8.1: 1506-215 (E) Too many arguments specified for macro NamedTargetSubdirs. In order to build the library, I cd'd into both the "lib" and "test" directory and did the following there: xmkmf make Alpha/OSF1 v3.2 Kept getting this message when trying to make: Make: Don't know how to make XsComponent.o. Stop. I ended up building the library and test case with the following: cd lib cxx -g -c *.C ar rlv libXsw.a *.o cd ../test cxx -g -c *.C -I../lib cxx -g *.o -o MDItest ../lib/libXsw.a -lXm -lXt -lX11 Linux "make Makefiles" did not work correctly. Just cd'd into both the "lib" and "test" directories and type: xmkmf make Also, if you don't have the C++ library (libC.a), you will get some undefined symbols like when linking: ../lib/libXsw.a(XsComponent.o): Undefined symbol _cout referenced from text segment ../lib/libXsw.a(XsComponent.o): Undefined symbol ostream::operator<<(char const *) referenced from text segment To get rid of these errors, you will need to recompile the library (specifically XsComponent.C) with -DNDEBUG. This will remove the calls to the library and will eliminate the need to link with the C++ library DOCUMENTATION ============= All documentation is written in HTML and can be found in the "doc" directory. The top-most documentation file is "mdi.html" AVAILABILITY =============== The latest version of MDI is available at: ftp://itimail.iti-oh.com/pub/project/sws/MDI-.tar.gz ftp://itimail.iti-oh.com/pub/project/sws/MDI-.tar.Z The MDI WWW page is located at: http://www.iti-oh.com/~sws/mdi.html COPYRIGHT ========= Copyright (c) 1996 Scott W. Sadler All rights reserved. See license conditions in the COPYRIGHT file of the MDI distribution BUG REPORTS =========== Please report any bugs, suggestions or criticisms directly to me at the address below. I want to make this as quality a software package as possible: stable, efficient and portable. It is the feedback from the X community that makes writing the software worthwhile. Scott W. Sadler sws@iti-oh.com http://www.iti-oh.com/~sws HISTORY ======= 03-Mar-96 Version 1.0 Released