31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Preparations<br />

Unpacking the <strong>LEDA</strong> distribution file <strong>LEDA</strong>-complete---.tar.gz will<br />

create the <strong>LEDA</strong> root directory ”<strong>LEDA</strong>-complete---”. You might want<br />

to rename it or move it to some different place. Let denote the final complete<br />

path name of the <strong>LEDA</strong> root directory.<br />

To install and use the Unix object code of <strong>LEDA</strong> you have to modify your environment<br />

as follows:<br />

• Set the environment variable <strong>LEDA</strong>ROOT to the <strong>LEDA</strong> root directory:<br />

csh/tcsh:<br />

sh/bash:<br />

setenv <strong>LEDA</strong>ROOT <br />

<strong>LEDA</strong>ROOT=<br />

export <strong>LEDA</strong>ROOT<br />

• Include $<strong>LEDA</strong>ROOT/<strong>Manual</strong>/cmd into your command search path (environment variable<br />

path (csh) or PATH (sh)) and call rehash (if required by your system).<br />

• Shared Libraries: (for solaris, linux, irix, osf1)<br />

If you planning to use shared libraries include $<strong>LEDA</strong>ROOT into the LD LIBRARY PATH<br />

search path. <strong>The</strong>n go to $<strong>LEDA</strong>RROOT and type make shared. This will construct<br />

the shared libraries from the static libraries.<br />

• xlman and demos: Go to $<strong>LEDA</strong>ROOT and type make xlman to compile and link<br />

<strong>LEDA</strong>’s interactive manual reader xlman. Now you can start xlman for reading and<br />

printing manual pages, starting demo programs and browsing more release notes.<br />

Compiling and Linking Application Programs<br />

1. Use the -I compiler flag to tell the compiler where to find the <strong>LEDA</strong> header files.<br />

CC (g++) -I$<strong>LEDA</strong>ROOT/incl -c file.c<br />

2. Use the -L compiler flag to tell the compiler where to find the libraries (libL.a/so,<br />

libG.a/so, ...)<br />

CC (g++) -L$<strong>LEDA</strong>ROOT file.o <br />

: -lL -lm (basic data types)<br />

-lG -lL -lm<br />

(graph data types)<br />

-lP -lG -lL -lm<br />

(planar geometry)<br />

-lD3 -lP -lG -lL -lm<br />

(3d geometry)<br />

-lW -lP -lG -lL -lX11 -lm<br />

(graphics)<br />

-lGeoW -lD3 -lW -lP -lG -lL -lX11 -lm (GeoWin)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!