***************************************************************************** * * * AGD and LEDA * * * * UNIX OBJECT CODE INSTALLATION * * * ***************************************************************************** Remark: Starting with AGD version 1.2, the commercial version of AGD is integrated in a LEDA package. The following procedures therefore are an extension of the installation procedure for LEDA. 1. Files and Directories ------------------------ To compile and link your programs with AGD and LEDA should contain at least the following files and subdirectories: AGD/Install/unix.txt this file Install/unix.txt installation and usage of LEDA incl/ the AGD and LEDA include directory libAGD.a (libAGD.so) AGD library libL.a (libL.so) LEDA basic library libG.a (libG.so) LEDA graph library libG2.a (libG2.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 Static libraries have extension .a. If shared libraries are provided they have extension .so. 2. Preparations --------------- Unpacking the AGD/LEDA distribution file (LEDA--AGD---.zip or LEDA--AGD---.tgz) will create the LEDA/AGD root directory "LEDA--AGD---". You might want to rename it or to move it to some different place. Let denote the final complete path name of the LEDA/AGD root directory. Now you have to modify your environment as follows: a) LEDAROOT: set the the environment variable LEDAROOT to csh/tcsh: setenv LEDAROOT sh/bash: LEDAROOT= export LEDAROOT b) Command Search Path: include $LEDAROOT/Manual/cmd into your command search path (environment variable path (csh) or PATH (sh)) and call "rehash" (if required by your system). c) Shared Libraries: (for solaris, linux, irix, osf1) If you are planning to use shared libraries include $LEDAROOT into the LD_LIBRARY_PATH search path. Then goto $LEDAROOT and type "make shared". This will construct the shared libraries libAGD.so, libL.so, libG.so, libG2.so, libP.so,libGeoW.so, libW.so, and libD3.so. 3. Compiling and linking application programs --------------------------------------------- a) Use the -I compiler flag to tell the compiler where to find the AGD and LEDA header files: CC (g++) -I$LEDAROOT/incl -c file.c b) Use the -L compiler flag to tell the compiler where to find the libraries (libAGD.a/so, libL.a/so, libG.a/so, ...) CC (g++) -L$LEDAROOT file.o : -lAGD -lP -lG -lL -lm (programs without LEDA windows) -lAGD -lW -lP -lG -lL -lX11 -lm (programs with LEDA windows) If using windows on solaris systems you might have to link with the system socket library and the network services library as well: CC (g++) ... -lAGD -lW -lP -lG -lL -lX11 -lsocket -lnsl -lm c) Compile and link simultaneously with CC (g++) -I$LEDAROOT/incl -L$LEDAROOT file.c You may want to ask your system adminstrator 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. Note: - The libraries must be given in the above order. 4. 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 "make" to compile and link all test or demo programs, respectively. 5. User Manual -------------- All manual pages for AGD and LEDA have been incorporated into the corresponding header files. LEDA provides tools (see $LEDAROOT/Manual/MANUAL/README) to extract and typeset the user manuals from these files. To generate a postscript version of the complete LEDA user manual go to $LEDAROOT and type "make man". The resulting file can be found in $LEDAROOT/Manual/MANUAL/MANUAL.ps. To generate the postscript version of the AGD user manual go to $LEDAROOT/AGD and type "make man". Postscript, PDF, and HTML versions of both manuals are also available at http://www.algorithmic-solutions.com