$==>$ Uptodate ???
File names and directory paths under UNIX
are case sensitive.
Since October 1989 the CERN GTS-GRAL licence has been extended to include general use of the company's software on any UNIX platform, including UNICOS on the CRAY. In addition, from July, 1990, GKSGRAL on Apollo platforms is supported under UNIX, rather than Aegis. However, affiliated institutes with a UNIX licence will still need a licence specifically for Apollo if they wish to receive the Apollo screen drivers.
As the UNIX system runs on many hardware platforms, only a few of which are available at CERN, it may not be possible for the CERN Program Library to distribute binary libraries for the particular machine a user requires. Thus, UNIX users may have to install the software from
a TAR file as explained in Appendix on Page
.
To use GKSGRAL or GKSGRAL-3D one requires access to the libraries, font files and include files. These should be made available via environment variables provided by the system manager. For example, if the C shell is being used, the following should be included in the .login file:
setenv gkshome /user/gts-gral_root_directory setenv gkslib $gkshome/gks/libs/gkslib.a setenv gksdriv $gkshome/gks/libs/gksdriv.a setenv gks3dlib $gkshome/gks3d/libs/gks3d.a setenv GKS_FONTS $gkshome/gks/fontsThus, all variables are defined in terms of
$gkshome, which should
be set to point to the local root directory.
Conversely, one can also store the files in a way analogous
to that used for the CERN Program Library, in which case the
environment variables should be set to:
setenv gkslib /cern/gks/pro/lib/gkslib.a setenv gksdriv /cern/gks/pro/lib/gksdriv.a setenv gks3dlib /cern/gks/pro/lib/gks3dlib.a setenv GKS_FONTS /cern/gks/pro/datEnvironment variables may be set under the Bourne or Aegis shells as in the example:
GKS_FONTS=/cern/gks/pro/dat; export GKS_FONTS #Bourne
or
GKS_FONTS := '/cern/gks/pro/dat'; export GKS_FONTS #Aegis.
To drive terminals attached via RS232 terminal lines, it is necessary also to make a logical connection between the Connection Identifier specified in the call to Open Workstation and the device. GKSGRAL communicates with a set of devices defined by environment variables gksch01 to gksch18, where the numbers 1 to 18 correspond to the connection identifier. Thus, if the connection identifier is set to '1', and one wishes to perform graphics on the same terminal used for alpha-numeric commands, then under the C shell one would need to type:
setenv gksch01 /dev/tty
To compile and link a Fortran program 'myprog.f' use the commands:
f77 myprog.f $gkslib $gksdriv -o myprog.exeIn this case the f77 command is used both to compile and link the program. One can also compile and link the program separately. However, even in this case one should probably use the f77 command to link, rather than ld. For example, on DECstations the f77 command automatically includes all the system libraries, whilst ld does not.
f77 -c myprog.f -o myprog.oIn general under UNIX the linker searches libraries in order. Thus, a reference from a library at the end of the sequence to a routine stored in an earlier library will result in an unresolved external reference. This is the case for GKS-3D. A solution is to specify the earlier library twice:
f77 myprog.o $gks3dlib $gksdriv $gks3dlib -o myprog.exe
The include files used when compiling graphics programs which
define the Workstation Types and GKS Parameters (Enumerated Types)
are to be found in the directory $gkshome/utl
and/or, on systems which
follow the CERN library conventions, /cern/gks/pro/utl.
They may be accessed from a FORTRAN program as follows:
INCLUDE '/cern/gks/pro/utl/gks_gtsdev'
and
INCLUDE '/cern/gks/pro/utl/gks_enum'
At run time GKS reads in the files defining the software fonts.
These are accessed via an environment variable GKS_FONTS which should
defined either by the system or user login procedure.
The example programs listed in the appendix of the
GKS/GKS-3D Primer are available either in $gkshome/dmo
or in /cern/gks/pro/dmo, with the names gksexN.f (N=1 to 6).
However, one may need to edit them in order to set the desired workstation
type and to use the correct paths to the include files.
On some systems the top directory /cern may not exist, in which case
one should use the environment variable $CERN to point to the root
directory.
File names and directory paths under UNIX are case sensitive;
$CERN is not equivalent to $cern!
A selection of help files, including this one, are to be found
in $gkshome/doc.