# How to use YACL with SGI DELTA C++

Last update: June 21st, 1997

This file provides directions on how to build YACL and its demo programs using SGI's native Delta C++ compiler.

## Building YACL

Here are the steps:

0. Create and change into the directory in which you want to install YACL. For example:

`mkdir ~/yacl cd ~/yacl`

1. Unzip the file yacl0170.zip, preserving directories. For example:

`unzip yacl0170.zip`

If you ftp'ed the .tar.Z version, uncompress and un-tar it:

  `uncompress yacl0170.tar.Z`
  `tar xvf yacl0170.tar`

2. Set the environment variable YACLPATH to point to the directory in which yacl was unzipped. For example (under bash or ksh):

`export YACLPATH=$HOME/yacl`

3. Edit the file control/cfr_sun.ctl and make sure that the path names specified there correspond to the paths of system components in your installation.

4. Build the libraries. CD into the directory you chose in step 0 and issue the make command

`make -f cfr_sgi.mak`

5. Poke around in the directory structure under basedemo and uidemo; build and try out the programs there using the makefiles provided. Each demo program is in a separate directory with a SGI C++-specific makefile called cfr_sgi.mak. I have provided makefiles for most of the base demos but not all because most, if not all, the base classes are heavily used in the UI classes.

You can also build a debug version of the library via the command

`make -f cfr_sgi.mak DEBUG="-g -DDEBUG"`

``

## Known problems

The memory leak checker reports a leak of 1024 bytes in some programs, when there is no leak. This is because the SGI Delta C++ iostream classes allocate memory the first time it is needed, and this memory is only destroyed after the main program is finished. This is reported as a leak by the leak checker, because the leak checker exits when the main program does.

The template instantiation seems to be buggy. Even with a -ptall flag, some templates -- CL_Sequence in particular -- were not being instantiated. I forced the instantiation using a pragma, and that seems to work. Look for code surrounded by "`#ifdef __SGI_DELTA_CC__`" to find out about this.

I haven't yet been able to get YACL shared libraries to work under SGI IRIX, mainly because I don't know how to get static objects in the shared library to initialize.