23.3 DECwindows Motif Programming Examples Using
BASIC
DECW$EXAMPLES contains two examples of DECwindows
Motif applications in BASIC: BASIC$HELLOMOTIF.BAS and
BASIC$MOTIFBURGER.BAS. SYS$LIBRARY:DECW$MOTIF.BAS,
which contains the DECwindows Motif declarations, is re-
quired to build the programs. The steps to build and run the
HELLOMOTIF example are:
1. Copy the needed files into your current directory:
$ COPY DECW$EXAMPLES:BASIC$HELLOMOTIF.* *.*
2. Build the Resource (UID) file:
$ UIL/MOTIF BASIC$HELLOMOTIF.UIL
3. Compile and link the BASIC program:
.
Use the following example for DECWindows Motif
V1.1:
$ BASIC BASIC$HELLOMOTIF
$ LINK BASIC$HELLOMOTIF,SYS$INPUT/OPTIONS
SYS$LIBRARY:DECW$DXMLIBSHR.EXE/SHARE
SYS$LIBRARY:DECW$XMLIBSHR.EXE/SHARE
SYS$LIBRARY:DECW$XTSHR.EXE/SHARE
^Z
$
.
Use the following example for DECWindows Motif
V1.2:
$ BASIC BASIC$HELLOMOTIF
$ LINK BASIC$HELLOMOTIF,SYS$INPUT/OPTIONS
SYS$LIBRARY:DECW$DXMLIBSHR12.EXE/SHARE
SYS$LIBRARY:DECW$MRMLIBSHR12.EXE/SHARE
SYS$LIBRARY:DECW$XMLIBSHR12.EXE/SHARE
SYS$LIBRARY:DECW$XTLIBSHRR5.EXE/SHARE
^Z
$
You may want to create an options file with the previously
mentioned shareable libraries in it.
4. If you are not running on a workstation, make sure that
your display is set correctly, for example:
$ SET DISPLAY/CREATE/NODE=xxxx
xxxx is the node name of a workstation with appropriate
graphic capability.
5. Run the application:
$ RUN BASIC$HELLOMOTIF