\chapter{Technical Information}
\label{Chapter Technical Information}

\section{System Requirements}

\index{system requirements}AGD is based on LEDA, the Library of Efficient Data
Types and Algorithms.
More information about LEDA is available at the LEDA homepage
\begin{center}
\htmladdnormallink{\texttt{http://leda.algorithmic-solutions.com/} }{
http://leda.algorithmic-solutions.com/}
\end{center}

AGD also provides optimal branch-and-cut
algorithms in a separate library {\tt libAGDopt}.
This library is not delivered with the commercial version by default, since
using this library requires that ABACUS~\cite{JT97}\index{ABACUS} (version 2.3)
is installed on your system. Additionally, ABACUS requires an LP-solver (Cplex,
SoPlex or Xpress). More information about ABACUS is available
at
\begin{center}
\htmladdnormallink{\texttt{http://www.oreas.de/} }{
http://www.oreas.de/}
\end{center}
If you want to obtain libAGDopt, please contact\\
{\tt agd@algorithmic-solutions.com}

\smallskip
AGD is distributed as source code package and as object code package for the
platforms shown in the following table.

\begin{center}
\begin{tabular} {|l|l|l|}
\hline
\multicolumn{3}{|c|}{\bf Platforms} \\
\hline
{\bf Machine}             & {\bf Operating System} & {\bf Compiler} \\
\hline
\hline
SUN Sparc         & SunOS, Solaris         & SunPRO CC5.1, CC5.2 (Forte 6)\\
&& g{\tt ++}--2.95, g{\tt ++}--3.0.1, KAI C{\tt ++} 3.4\\
\hline
Silicon Graphics  & IRIX                   & CC, g{\tt ++}--2.95\\
\hline
Silicon Graphics  & IRIX64                 & CC\\
\hline
Hewlett Packard   & HP-UX                  & aCC, g{\tt ++}--2.95\\
\hline
DEC               & OSF           & cxx, g{\tt ++}--2.95\\
\hline
DEC               & Linux           & g{\tt ++}--2.95\\
\hline
IBM               & AIX                    & xlC\\
\hline
80x86             & Linux                  & g{\tt ++}--2.91, g{\tt ++}--2.95,
g{\tt ++}--2.96,\\&& g{\tt ++}--3.0.1\\
\hline
80x86             & Solaris                & g{\tt ++}--2.95, g{\tt ++}--3.0.1\\
\hline
80x86             & Windows 95/98/2000/NT         & Borland 5.4, 5.5\\
\                 &  DLLs  and   libs      & Microsoft Visual \CC\ 5.0, 6.0\\
\hline
\end{tabular}\label{Available platforms}
\end{center}


If the platform you're using is not listed here, please contact\\
 {\tt agd@algorithmic-solutions.com}. 

Notice: Starting from AGD version 1.2, the commercial version of AGD is 
integrated in a LEDA package. The following procedures therefore are an 
extension of the corresponding parts of the LEDA Manual.

\medskip 
Section \ref{Installation} describes how to compile the LEDA libraries and the 
AGD library in the source code package for Unix and Microsoft Windows. Section 
\ref{UnixObjectCodePackage} and Section \ref{WinObjectCodePackage} 
describe the installation and usage of the object code packages for Unix
and Windows, respectively.

\section{Compiling the Source Code Package}\label{Installation}
The LEDA/AGD main directory of the source code package should contain the 
following files and subdirectories:

\begin{center}
\begin{tabular}{ll}
AGD/Readme.txt           & information about AGD\\
AGD/                & documentation for AGD\\
Readme.txt               & information about LEDA\\
CHANGES  (please read !) & most recent changes of LEDA\\
FIXES                    & bug fixes since last release of LEDA\\
Install/                 & documentation for installation and usage of LEDA\\
Manual/                  & sources for LEDA user manual\\
man\_html/               & HTML version of LEDA user manual\\
license.txt              & license text\\
lconfig                  & configuration command for unix\\
lconfig.bat              & configuration command for windows\\
Makefile                 & make script\\
confdir/                 & configuration directory\\
incl/                    & include directory\\
src/                     & source files\\
test/                    & example and test programs\\
demo/                    & demo programs\\
demo\_cout/               & command line demo programs
\end{tabular}
\end{center}

\subsubsection{Configuration for UNIX}

\begin{enumerate}

\item Go to the LEDA/AGD main directory.

\item Type: \texttt{lconfig <cc>  [static | shared]}\\
\ \\
where \texttt{<cc>} is the name (or command) of your \CC\ compiler
and the optional second parameter defines the kind of libraries
to be generated. Note that in the current release shared
libraries can be made only under SunOS 5.x (Solaris), Linux, and
IRIX.\\
\ \\
Examples: \texttt{lconfig CC}, \texttt{lconfig g++}, \texttt{lconfig 
sunpro shared}\\
\ \\
\texttt{lconfig} without arguments prints a list of known compilers.\\

\end{enumerate}

\subsubsection{Compiling for UNIX}
Type \texttt{make} for building the object code libraries
\begin{center}
\begin{tabular}{ll}
libAGD.a   (libAGD.so)  & AGD  library\\
libL.a   (libL.so)  & LEDA main  library\\
libG.a   (libG.so)  & LEDA graph library\\
libG2.a  (libG2.so) & LEDA semi-dynamic graph library\\
libP.a   (libP.so)  & LEDA d2-geo library\\
libD3.a  (libP.so)  & LEDA d3-geo library\\
libW.a   (libW.so)  & LEDA window library\\
libGeoW.a (libGeoW.so) & LEDA GeoWin library  
\end{tabular}
\end{center}
\noindent (*.so if shared libraries are used)

Now follow the instructions given in  Section \ref{UnixObjectCodePackage}.


\subsubsection{Configuration for Windows with MS Visual \CC}
\begin{enumerate}
\item Set the Environment Variables for Visual \CC:\\
The compiler CL.EXE and the linker LINK.EXE require that the environment 
variables PATH, INCLUDE, and LIB have been set properly.\\
PATH must point to the $\backslash$bin subdirectory of your Visual 
C\texttt{++} 
installation, LIB must point to $\backslash$lib, and INCLUDE to 
$\backslash$include.\\
When you installed Visual \CC, setup created a batch file, 
VCVARS32.BAT,
containing the commands to modify the PATH, LIB, and INCLUDE environment
variables. Run VCVARS32.BAT before you compile at the command prompt.\\
To run VCVARS32.BAT:
\begin{enumerate}
\item At the command prompt, change to the $\backslash$bin subdirectory of 
your Visual \CC\ installation
(for instance c:$\backslash$programs$\backslash$microsoft developer 
studio$\backslash$vc98$\backslash$bin ).
\item      Run VCVARS32.BAT by typing VCVARS32.
\end{enumerate}
\item Go to the LEDA/AGD main directory.
\item Type: \texttt{lconfig msc [dll] [ ml | mld | md | mdd | mt | mtd ]}
\end{enumerate}
        
{\bf Remark:} When building an application with AGD and MS Visual 
\CC, the AGD library you use depends on which Microsoft C runtime 
library
           you intend to link with.
           Your application code and AGD both must be linked to the same 
           Microsoft C runtime library; otherwise serious linker or runtime 
           errors may occur.
           The Microsoft C runtime libraries are related to the compiler 
           options as follows

\begin{center}
\begin{tabular}{|l|l|}
\hline
           C Runtime Library         &   Option\\ \hline

           LIBC.LIB                   &  -ML\\
           LIBCD.LIB                  &  -MLd\\
           LIBCMT.LIB                 &  -MT\\
           LIBCMTD.LIB                &  -MTd\\
           MSVCRT.LIB                 &  -MD\\
           MSVCRTD.LIB                &  -MDd\\
\hline
\end{tabular}
\end{center}

           In order to get the suitable Libs or DLL please choose the 
           corresponding option in the call of \texttt{lconfig}.

\subsubsection{Configuration for Windows with Borland \CC}
\begin{enumerate}
\item Set the Environment Variables for Borland \CC:\\
The compiler BCC32.EXE and the linker TLIB.EXE require that the environment 
variables PATH, INCLUDE, and LIB have been set properly.\\
PATH must point to the $\backslash$bin subdirectory of your Borland 
C\texttt{++} 
installation, LIB must point to $\backslash$lib, and INCLUDE to 
$\backslash$include.\\
When you installed Borland \CC, setup created a batch file, like
bor54.bat or bor551.bat,
containing the commands to modify the PATH, LIB, and INCLUDE environment
variables. Run the corresponding batch file before you compile at the 
command prompt.
\item Go to the LEDA/AGD main directory.
\item Type: \texttt{lconfig bcc [dll]  [ d ]}
\end{enumerate}

\subsubsection{Compiling for Windows}

       Type \texttt{make\_lib} for building the object code libraries 
\begin{center}
\begin{tabular}{lll}
       static: & libAGD.lib    &   AGD  library\\ 
               & libL.lib    &   LEDA basic  library\\
               & libG.lib    &   LEDA graph  library\\
               & libG2.lib    &   LEDA semi--dynamic graph library\\
               & libP.lib    &   LEDA d2-geo library\\
               & libD3.lib   &   LEDA d3-geo library\\
               & libGeoW.lib&    LEDA GeoWin library\\
               & libW.lib &      LEDA window library\\
&&\\
      dynamic: & libAGD.lib&\\
      & leda.dll    &\\ 
      &          leda.lib&\\
   & libGeoW.lib& 
\end{tabular}
\end{center}
Notice: AGD and GeoWin are currently not available as DLLs.

Now follow the instructions given in Section \ref{WinObjectCodePackage}.


\section{Usage of Header Files}\label{Header Files}
AGD and LEDA data types and algorithms can be used in any \CC\ program as 
described in this manual. The specifications (class declarations) are contained
in header files. To use a specific data type its header file has to be 
included into the program. In general the header file for data type 
{\tt xyz} is \<AGD/xyz.h\>. To use a LEDA data type {\tt klm} in a program
you need to include \<LEDA/klm.h\>.

\section{Unix Object Code Installation and Usage} 
\label{UnixObjectCodePackage}
\subsubsection{Files and Directories}
To compile and link your programs with AGD and LEDA, the LEDA/AGD main 
directory should
contain at least the following files and subdirectories:
\begin{center}
\begin{tabular}{ll}
AGD/Install/unix.txt 
& file describing installation and usage\\
incl/ & the include directory for AGD and LEDA\\
libAGD.a (libAGD.so) & AGD library\\
libL.a (libL.so) & LEDA basic library\\
libG.a (libG.so) & LEDA graph library\\
libG2.a (libG.so) & LEDA semi--dynamic graph library\\
libP.a (libP.so) & LEDA plane geometry library\\
libD3.a (libD3.so) & LEDA 3D geometry library\\
libW.a (libW.so) & LEDA window library\\
libGeoW.a (libGeoW.so) & LEDA GeoWin library
\end{tabular}
\end{center}

  Static libraries have extension \texttt{.a}.  
  If shared libraries are provided they have extension \texttt{.so}.

\subsubsection{Preparations}
To install and use the Unix object code of AGD and LEDA you have to modify 
your environment as follows:
\begin{itemize}
   \item LEDAROOT:
       set the the environment variable LEDAROOT to the LEDA/AGD main directory
       $<$LEDAAGD$>$:

\begin{center}
\begin{tabular}{ll}
       csh/tcsh:  & setenv LEDAROOT $<$LEDAAGD$>$\\
&\\
       sh/bash: &   LEDAROOT=$<$LEDAAGD$>$\\
                 &  export LEDAROOT
\end{tabular}
\end{center}

   \item Command Search Path:
       include \$LEDAROOT/Manual/cmd into your command search path 
       (environment variable path (csh) or PATH (sh)) and call \texttt{rehash} 
       (if required by your system).

  \item  Shared Libraries:   (for solaris, linux, irix, osf1)\\
       If you are using shared libraries include \$LEDAROOT into 
       the LD\_LIBRARY\_PATH search path.
\end{itemize}


\subsubsection{Compiling and linking application programs}
\begin{enumerate}
\item  Use the -I compiler flag to tell the compiler where to find the AGD 
and LEDA header files.
\begin{verbatim}
      CC (g++) -I$LEDAROOT/incl -c file.c
\end{verbatim}

\item Use the -L compiler flag to tell the compiler where to find the 
      libraries
\begin{verbatim}
      CC (g++)  -L$LEDAROOT file.o  <libs>
\end{verbatim}

\begin{center}
\begin{tabular}{lll}
      $<$libs$>$:& -lAGD    -lP -lG -lL -lm   & if LEDA windows are NOT used\\ 
&-lAGD -lW  -lP -lG -lL -lm   & if LEDA windows are used
\end{tabular}
\end{center}

      If using windows on Solaris systems you might have to link with the 
      system socket library and the network services library as well:
\begin{verbatim}
      CC (g++)  ... -lAGD -lW -lP -lG -lL -lX11 -lsocket -lnsl -lm
\end{verbatim}
{\bf Notice:} The libraries must be given in the above order.

\item Compile and link simultaneously with
\begin{verbatim}
      CC (g++)  -I$LEDAROOT/incl -L$LEDAROOT file.c  <libs>
\end{verbatim}
\end{enumerate}

   You may want to ask your system administrator to install the header files 
   and libraries in the system's default directories.
   Then you no longer have to specify header and library search paths on the 
   compiler command line.


\subsubsection{Example programs and demos}
   The source code of all example and demo programs can be found in 
   \$LEDAROOT/test and \$LEDAROOT/demo. Goto \$LEDAROOT/test or 
   \$LEDAROOT/demo and type \texttt{make} to compile and link all test or demo 
   programs, respectively. 

\section{Windows Object Code Installation and Usage} 
\label{WinObjectCodePackage}
This section describes the installation and usage of static libraries of
AGD and LEDA with Microsoft Visual \CC. The installation and usage of DLL's or
static libraries for other compilers is similar. Please read the 
corresponding installation file in the 
\texttt{AGD$\backslash$Install$\backslash$} 
subdirectory of the LEDA/AGD main directory.

\subsubsection{Files and Directories}
To compile and link your programs with AGD and LEDA, the LEDA/AGD main 
directory \<LEDAADGD\> should
contain the following files and subdirectories:
\begin{center}
\begin{tabular}{ll}
AGD$\backslash$Install$\backslash$win32\_lib.txt 
& installation and usage of static libraries\\
AGD$\backslash$Install$\backslash$win32\_dll.txt 
& installation and usage of DLL's\\
incl$\backslash$ & the AGD and LEDA include directory
\end{tabular}
\end{center}
and at least one of the following library sets
\begin{itemize}
\item \texttt{
   libagd\_ml.lib,
   libl\_ml.lib,
   libg\_ml.lib,
   libg2\_ml.lib,
   libp\_ml.lib,
   libw\_ml.lib,
   libgeow\_ml.lib,
   libd3\_ml.lib}
\item \texttt{
libagd\_mld.lib,
   libl\_mld.lib,
   libg\_mld.lib,
   libg2\_mld.lib,
   libp\_mld.lib,
   libw\_mld.lib,
   libgeow\_mld.lib,
   libd3\_mld.lib}
\item \texttt{libagd\_md.lib,
   libl\_md.lib,
   libg\_md.lib,
   libg2\_md.lib,
 libp\_md.lib,
   libw\_md.lib,
   libgeow\_md.lib,
   libd3\_md.lib}
\item \texttt{libagd\_mdd.lib,
   libl\_mdd.lib,
   libg\_mdd.lib,
   libg2\_mdd.lib,
   libp\_mdd.lib,
   libw\_mdd.lib,
   libgeow\_mdd.lib,
   libd3\_mdd.lib}
\item \texttt{libagd\_mt.lib,
   libl\_mt.lib,
   libg\_mt.lib,
   libg2\_mt.lib,
   libp\_mt.lib,
   libw\_mt.lib,
   libgeow\_mt.lib,
   libd3\_mt.lib}
\item \texttt{libagd\_mtd.lib,
   libl\_mtd.lib,
   libg\_mtd.lib,
   libg2\_mtd.lib,
   libp\_mtd.lib,
  libw\_mtd.lib,
   libgeow\_mtd.lib,
   libd3\_mtd.lib }
\end{itemize}

\subsubsection{Compiling and Linking Application Programs in Microsoft Visual 
Studio \label{complinkstudio}}
   To compile and link an application program using AGD and LEDA in 
   Microsoft Visual Studio proceed as follows:
\begin{description}
\item[(1)] In the "File" menu of Visual Studio click on "New"
\item[(2)] Choose "Win 32 Console Application" in "Projects", fill in the
      project name, and click "OK"
\item[(3)] Choose "Empty Project" and click "Finish"
\item[(4)] After clicking "OK" you have an empty project space
\\
\item[If you already have a source file \texttt{prog.cpp}:]
\item[(5)] Activate the file browser and add \texttt{prog.cpp} to the main folder
      of your project
\item[(6)] In the "Workspace" of Visual Studio click on "Source Files" with
      the right mouse button, then click on "Add File to Folder" with 
      the left mouse button
\item[(7)] Double click on \texttt{prog.cpp}
\\
\item[If you want to enter a new source file:]
\item[(5')] In the "File" menu click on "New"
\item[(6')] Choose "\CC\ Source File" in "Files", fill in the file name, and 
click       "OK"
\item[(7')] Enter your code
\\
\item[(8)] In the "Project" menu click on "Settings"
\item[(9)] Choose "C/\CC" and enter in "Project Options" the compiler flag you 
      want to use. The default value is "/MLd", alternatives are
      "/ML", "/MD", "/MDd", "/MT", and "/MTd". 
      Notice that you have to use the AGD and LEDA libraries that correspond 
to the 
      chosen flag, e.g., with option "/MD" you must use 
      \texttt{libagd\_md.lib, libl\_md.lib, libg\_md.lib, libp\_md.lib,}
   and \texttt{libw\_md.lib}.
      Using another set of libraries with "/MD" could lead to serious 
      linker errors.
\item[(10)] Choose "Linker" and add the name of the AGD and LEDA libraries you 
want to
       use at the beginning of line "Object-/Library-Modules" as follows.
       I use $<$opt\> to indicate the compiler option chosen in Step (9) 
       (,i.e., $<$opt\> is \texttt{mld} for "/MLd", \texttt{ml} for 
"/ML", ...).
\begin{itemize}   

          \item \texttt{libagd\_$<$opt$>$.lib libp\_$<$opt$>$.lib libg\_$<$opt$>$.lib libl\_$<$opt$>$.lib}\\
            for programs without LEDA windows

          \item \texttt{libagd\_$<$opt$>$.lib libw\_$<$opt$>$.lib libp\_$<$opt$>$.lib libg\_$<$opt$>$.lib libl\_$<$opt$>$.lib wsock32.lib}\\
            for programs using LEDA windows

\end{itemize}
\item[(11)] Click "OK" to leave the "Settings" 

\item[(12)] In the "Extras" menu click on "Options"
\item[(13)] Choose "Directories" 
\item[(14)] Choose "Include Files" in "Show Directories for:" and add the 
       directory \texttt{$<$LEDAAGD$>$$\backslash$incl} containing the AGD and 
LEDA include files 
       (Double click on the small rectangle in "Directories", enter 
       \texttt{$<$LEDAAGD$>$$\backslash$incl}, or click on the small grey 
       rectangle on the right and
       choose the correct directory.)
\item[(15)] Choose "Library Files" in "Show Directories for:" and add the 
       directory \texttt{$<$LEDAAGD$>$} containing the AGD and LEDA libraries.
\item[(16)] Click "OK" to leave the "Options"

\item[(17)] In the "Build" menu click on "Build prog.exe" or "Rebuild All"
       to compile your program.

\item[(18)] In the "Build" menu click on "Execute prog.exe" to execute 
       your program.
\end{description}

   Remarks: If your \CC\ source code files has extension .c, you need to add 
            the option "/Tp" in "Project Options" (Step (9)), otherwise you 
            will get a number of compiler error.

   Examples of workspaces can be found in the directory \\
   \texttt{\<LEDAAGD\>$\backslash$demo$\backslash$msc\_workspaces}.


\subsubsection{Adding AGD to a Project in Microsoft Visual Studio}

   To link the AGD and LEDA libraries to an already existing project proceed 
as    follows:
\begin{description}
\item[(1)] Start the Microsoft Visual Studio with your project
\item[(2)] In the "Project" menu click on "Settings"
\item[(3)] Choose "C/C++" and check in "Project Options" the compiler flag you 
      use for your project. The default value is "/MLd", alternatives are
      "/ML", "/MD", "/MDd", "/MT", and "/MTd". 
      Notice that you have to use the AGD and LEDA libraries that correspond
 to the 
      chosen flag, e.g., with option "/MD" you must use 
      \texttt{libagd\_md.lib, libl\_md.lib, libg\_md.lib, libp\_md.lib}, 
and \texttt{libdw\_md.lib}.
      Using another set of libraries with "/MD" will lead to serious 
      linker errors.
\item[(4)] Choose "Linker" and add the name of the AGD and LEDA libraries you 
want to
       use at the beginning of line "Object-/Library-Modules" as follows.
       I use $<$opt\> to indicate the compiler option chosen in Step (3) 
       (,i.e., $<$opt\> is \texttt{mld} for "/MLd", \texttt{ml} for 
"/ML", ...).
\begin{itemize}   

          \item \texttt{libagd\_$<$opt$>$.lib libp\_$<$opt$>$.lib libg\_$<$opt$>$.lib libl\_$<$opt$>$.lib}\\
            for programs without LEDA windows

          \item \texttt{libagd\_$<$opt$>$.lib libw\_$<$opt$>$.lib libp\_$<$opt$>$.lib libg\_$<$opt$>$.lib libl\_$<$opt$>$.lib wsock32.lib}\\
            for programs using LEDA windows

\end{itemize}
\item[(5)] Click "OK" to leave the "Settings" 

\item[(6)] In the "Extras" menu click on "Options"
\item[(7)] Choose "Directories" 
\item[(8)] Choose "Include Files" in "Show Directories for:" and add the 
      directory \texttt{\<LEDAAGD\>$\backslash$incl} containing the AGD and 
LEDA include files 
      (Double click on the small rectangle in "Directories", enter 
      \texttt{\<LEDAAGD\>$\backslash$incl}, or click on the small grey rectangle 
on the right and
      choose the correct directory.)
\item[(9)] Choose "Library Files" in "Show Directories for:" and add the 
      directory \texttt{\<LEDAAGD\>} containing the AGD and LEDA libraries.
\item[(10)] Click "OK" to leave the "Options"

\item[(11)] You can now use the data types provided by AGD and LEDA in your 
project
       as described in this manual.
\end{description}



\subsubsection{Compiling and Linking Application Programs in a DOS-Box}
\begin{description}
\item[(a) Setting the Environment Variables for Visual \CC:]
\ \\
      The compiler CL.EXE and the linker LINK.EXE require that the 
environment 
      variables PATH, INCLUDE, and LIB have been set properly.
      PATH must point to the $\backslash$bin subdirectory of your Visual \CC\ 
      installation,
      LIB must point to $\backslash$lib, and INCLUDE to $\backslash$include.
      When you installed Visual \CC, setup created a batch file, 
      VCVARS32.BAT, containing commands to modify the PATH, LIB, and INCLUDE 
      environment variables. Run VCVARS32.BAT before you compile at the 
      command prompt. VCVARS32.BAT is located in the $\backslash$bin 
      subdirectory.

      Note that you do not need to run VCVARS32.BAT if you are compiling your 
      program inside the development environment (see above).

      To run VCVARS32.BAT:
\begin{itemize}
\item At the command prompt, change to the $\backslash$bin subdirectory of 
      your Visual \CC\ installation (for instance 
      c:$\backslash$programs$\backslash$microsoft developer studio$\backslash$vc98$\backslash$bin ).
\item Run VCVARS32.BAT by typing VCVARS32.
\end{itemize}
          
      To compile programs together with the AGD and LEDA libraries, the 
environment 
      variables PATH, LIB, and INCLUDE must additionally contain the 
      corresponding AGD/LEDA directories.
      There are two possibilities to modify the environment variables. The
      first can be used to change the variables for a single DOS-box, the 
      second to modify the variables permanently.

\item[(b) Setting Environment Variables for AGD and LEDA in a single DOS-Box:]
\ \\
      The LEDA/AGD main directory contains the batch file SET\_LEDA\_PATHS.BAT.
      This file can be used to change the environment variables as follows:
\begin{itemize}
      \item At the command prompt run VCVARS32.BAT as described above.
      \item Change to the LEDA/AGD main directory \texttt{\<LEDAAGD\>}
      \item Run SET\_LEDA\_PATHS.BAT by typing\\ SET\_LEDA\_PATHS \<LEDAAGD\>\\
            ,e.g., if you have LEDA/AGD in d:$\backslash$LEDA--4.3, you type\\
             SET\_LEDA\_PATHS d:$\backslash$leda--4.3
\end{itemize}

\item[(c) Setting Environment Variables for AGD and LEDA permanently:]
\
\begin{description}
\item[(i)  Windows NT/2000:]
\ 
\begin{enumerate}
\item On the "Start" menu, point to "Settings", then click
             "Control Panel".
\item In the "Control Panel", double click "System". 
\item  In the System Properties dialog box, click the Environment tab, 
             and specify your environment variable setting for PATH,
             INCLUDE, and LIB, using the "User Variables for", Variable, and 
             Value boxes. 

             If such a user variable already exists, click it in the User
             Variables for list. The name will then appear in the "Variable"
             field and its value in the "Value" field. Extend the current
             value by appending the appropriate LEDA/AGD directory separated 
             by ";" from the existing values as follows:

\begin{itemize}
             \item extend PATH by \texttt{\<LEDAAGD\>}
             \item extend INCLUDE by \texttt{\<LEDAAGD\>$\backslash$incl}
             \item extend LIB by \texttt{\<LEDAAGD\>}
\end{itemize}

             In case a user variable does not exist, enter its name in 
             the "Variable" field and the value in the "Value" field.
\begin{itemize}
             \item set PATH to \texttt{\<LEDAAGD\>}
             \item set INCLUDE to \texttt{\<LEDAAGD\>$\backslash$incl}
             \item set LIB to \texttt{\<LEDAAGD\>}
\end{itemize}
\end{enumerate}
\item[(ii) Windows 95/98:]
\ 
\begin{enumerate}
          \item Change the file \texttt{autoexec.bat} as follows:

             If the variables PATH, INCLUDE, or LIB are already set in 
             \texttt{autoexec.bat}, append the appropriate LEDA/AGD directory 
             separated by ";" from the existing values as follows:

\begin{itemize}
             \item extend PATH by \texttt{\<LEDAAGD\>}
             \item extend INCLUDE by \texttt{\<LEDAAGD\>$\backslash$incl}
             \item extend LIB by \texttt{\<LEDAAGD\>}
\end{itemize}

             If a variable is not set, add it to \texttt{autoexec.bat} by 
             writing:
\begin{description}
             \item \texttt{set PATH=\<LEDAAGD\> }
             \item \texttt{set INCLUDE=\<LEDAAGD\>$\backslash$incl}
             \item \texttt{set LIB=\<LEDAAGD\>}
\end{description}

          \item Restart Windows 95 for the change to take effect. 
\end{enumerate}
\end{description}

      After these procedures, it suffices to call VCVARS32.BAT at the 
      command prompt. In both cases the LEDA/AGD paths are automatically 
      appended to the compiler paths.

\item[(d) Compiling and Linking Programs:]
\ \\
      After setting the environment variables, you can use the libraries as 
      follows to compile and link programs.

      Programs without LEDA windows:
\begin{verbatim}
cl <options> -Tp prog.c <libagd.lib> <libp.lib> <libg.lib> <libl.lib>
\end{verbatim}

      where \<options\> and \<lib*.lib\> are related as follows:
\begin{center}
\begin{tabular}{lllll}
      \<options\> &\<libagd.lib\> &\<libp.lib\> &\<libg.lib\> &  
\<libl.lib\>    \\ \\
-ML&    libagd\_ml.lib &libp\_ml.lib &libg\_ml.lib   & libl\_ml.lib  \\
-MLd&    libagd\_mld.lib &libp\_mld.lib &libg\_mld.lib & libl\_mld.lib\\
-MD&    libagd\_md.lib &libp\_md.lib &libg\_md.lib &  libl\_md.lib  \\
-MDd&     libagd\_mdd.lib &libp\_mdd.lib &libg\_mdd.lib & libl\_mdd.lib\\
-MT&    libagd\_mt.lib &libp\_mt.lib &libg\_mt.lib &libl\_mt.lib\\
-MTd&   libagd\_mtd.lib &libp\_mtd.lib &libg\_mtd.lib  &libl\_mtd.lib
\end{tabular}
\end{center}

      {\bf Remark:} 
The option -Tp is necessary if the \CC\ source code files have 
              extension \texttt{.c}, if your files have extension \texttt{.cpp}
 this option
              is not necessary.


      Programs using LEDA windows:
\begin{verbatim}
cl <options> -Tp prog.c <libagd.lib> <libw.lib> <libp.lib>\
 <libg.lib> <libl.lib> wsock32.lib user32.lib gdi32.lib\
 comdlg32.lib  shell32.lib advapi32.lib
\end{verbatim}

      where \<options\> and \<lib*.lib\> are related analogously to the case above.
\end{description}

\subsubsection{Example programs and demos}
   The source code of all example and demo programs can be found in 
   the directory \texttt{\<LEDAAGD\>$\backslash$test} and 
   \texttt{\<LEDAAGD\>$\backslash$demo}. 
   Goto \texttt{\<LEDAAGD\>} and type
   \texttt{make\_test} or \texttt{make\_demo} to compile and link all test or 
   demo programs, respectively. 
