next up previous contents
Next: Namespaces and Interaction with Up: Usage Previous: Header Files

  
Libraries

The implementions of most LEDA data types and algorithms are precompiled and contained in the 5 libraries mentioned above (libL.a, libG.a, libP.a, libW.a, lib3D.a). They can be linked with C++ application programs. In the following description it is assumed that these libraries are installed in one of the systems default library directories (e.g. /usr/lib), which allows to use the "-l..." compiler option.

libL.a
is the main LEDA library, it contains the implementations of all simple data types (chapter Simple Data Types), basic data types (chapter Basic Data Types), dictionaries and priority queues (chapter Dictionaries and Related Types and Priority Queues and Related Types). A program prog.c using any of these data types has to be linked with the libL.a library like this:

CC prog.c -lL -lm

libG.a
is the LEDA graph library. It contains the implementations of all graph data types and algorithms (chapter Graphs and Related Data Types). To compile a program using any graph data type or algorithm the libG.a and libL.a library have to be used:

CC prog.c -lG -lL -lm

libP.a
is the LEDA library for geometry in the plane. It contains the implementations of all data types and algorithms for geometry (chapter Basic Data Types for Two-Dimensional Geometry and Advanced Data Types for Two-Dimensional Geometry). To compile a program using geometric data types or algorithms the libP.a, libG.a, libL.a and maths libraries have to be used:

CC prog.c -lP -lG -lL -lm

libW.a
is the LEDA library for graphic windows under the X11 window system. Application programs using data type window (cf. section Panels) have to be linked with this library:

CC prog.c -lW -lP -lG -lL -lX11 -lm

libD3.a
is the LEDA library for three-dimensional geometry. Application programs using three-dimensional data types (cf. chapter Basic Data Types for Three-Dimensional Geometry) have to be linked with this library:

CC prog.c -lD3 -lW -lP -lG -lL -lX11 -lm

Remarks:


next up previous contents
Next: Namespaces and Interaction with Up: Usage Previous: Header Files
LEDA research project
1998-10-02