Introduction
************

Install Tree
************

The installed version of the dtcore libraries is stored at /mas/garden/system/dtcore.  To automatically add the paths for dtcore binaries, manpages, and shared libraries to your environment, add the dtcore package.

Version Numbers
===============

The organization of the install tree uses a simple version numbering system to allow multiple installed versions of the dtcore libraries. This is intened to allow people to develop and debug the system-level libraries without overly affecting the work of application programmers.

The version number of the dtcore software used by programs and libraries is controlled by the environment variable DTCORE_VERSION.  The dtcore package uses the value of this variable when deciding what paths for binaries and shared libraries to put in your environment.  As a result, you will need to run reset_env from the shell whenever you change the value of DTCORE_VERSION.  You should not normally need to think about the value of DTCORE_VERSION: it should be set automatically to the appropriate value by the dtcore package.

When writing programs, it is a good idea to set the value of DTCORE_VERSION in the Makefile for that program.  This will keep the version of the dtcore software used in the program from changing suddenly as new releases are made.  As old releases of dtcore are purged from the system, you will eventually need to update the value of DTCORE_VERSION in your makefile, but this should at least make the process a bit more controlled.

Linking Programs
================

To link against the dtcore libraries, add the following line to your Makefile:

     DTCORE_VERSION = 0.2.30

This will set the value of DTCORE_VERSION to the most recent released version.  You will occasionally need to update this value as new versions of dtcore are released.

Add the following option to the value of LDFLAGS:

     -L/mas/garden/system/gnu/lib/${SYS}
     -L/mas/garden/system/dtcore/install/lib/${SYS}/${DTCORE_VERSION}/dtcore

On the alpha, add the following option to LDFLAGS to use shared libraries:

     -call_shared -L/mas/garden/system/gnu/shlib/${SYS}
     -L/mas/garden/system/dtcore/install/shlib/${SYS}/${DTCORE_VERSION}/dtcore

It is generally better to use shared libraries where available, as this will dramatically reduce link times for your programs.

Finally, add the appropriate -l options to the link command for your program.

The following libraries are provided by dtcore:

syslog
     A library of error reporting routines.

utils
     A collection of set, map, and AVL tree classes taken from libg++ and ported to the alpha.

dsys++
     A set of classes to make TCP/IP connections look like C++ iostreams.  A generalized replacement for select().  A simple way to make network servers and clients.  Requires -lsyslog and -lutils.  For more information, see the documentation for dsys++.

dtype++
     An interface to Scheme objects for C++.  An embeddable Scheme interpreter for C++ programs.  Requires -lsyslog and -lutils.  Also requires -lgmp and -lm.  Might require -ldsys++, but shouldn't.  For more information, see the documentation for dtype++.

dt_evalfuncs
     A basic collection of routines for people writing embeddable scheme applications.  Requires -ldtype++.

dt_evalfuncs_core
     A large collection of scheme primitives.  Requires -ldtype++. May also require any of -lregex, -lgdbm, -lreadline based on what functions are used.