next up previous contents index
Next: Windows Object Code Installation Up: Technical Information Previous: Usage of Header Files   Contents   Index


Unix Object Code Installation and Usage

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:
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

Static libraries have extension .a. If shared libraries are provided they have extension .so.

Preparations

To install and use the Unix object code of AGD and LEDA you have to modify your environment as follows:

Compiling and linking application programs

  1. 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
    

  2. Use the -L compiler flag to tell the compiler where to find the libraries
    
          CC (g++)  -L$LEDAROOT file.o  <libs>
    

    <libs>: -lAGD -lP -lG -lL -lm if LEDA windows are NOT used
      -lAGD -lW -lP -lG -lL -lm if LEDA windows are used

    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
    
    Notice: The libraries must be given in the above order.

  3. Compile and link simultaneously with
    
          CC (g++)  -I$LEDAROOT/incl -L$LEDAROOT file.c  <libs>
    

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.

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.



Subsections
next up previous contents index
Next: Windows Object Code Installation Up: Technical Information Previous: Usage of Header Files   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13