INSTALL
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:5k
开发平台:

MultiPlatform

  1. *******************************************************************************
  2. *                                                                             *
  3. *                              LEDA 3.2                                       *
  4. *                                                                             *
  5. *                            INSTALLATION                                     *
  6. *                                                                             *
  7. *******************************************************************************
  8. In this file I use <LEDA> to denote the path name of the LEDA main 
  9. directory. It should contain the following files and subdirectories: 
  10. README                    information about LEDA
  11. INSTALL                   this file
  12. Changes  (please read !)  most recent changes
  13. Compiler (please read !)  list of compilers, problems, and required flags
  14. Fixes                     bug fixes since last release
  15. Makefile                  make script
  16. incl/                     LEDA include directory
  17. src/                      LEDA source files
  18. prog/                     example programs
  19. web/                      some cweb sources
  20. man/                      user manual (TeX)
  21. LEDA should be usable with any C++ compiler that supports templates.
  22. 1. COMPILING
  23. -------------
  24.    You have to make the following libraries (cf. user manual section 1.9) :
  25.    libL.a             main  library
  26.    libG.a             graph library
  27.    libP.a             plane library
  28.    libWx.a            X11 window library  (optional)
  29.    a)  go to the LEDA main directory
  30.        cd <LEDA>
  31.    b)  Create a symbolic link "c++" to your C++ compiler
  32.           ln -s /usr/local/bin/g++  c++  
  33.        or ln -s /bin/CC  c++
  34.        If using g++ (version > 2) you also have to make a link "gcc" to the 
  35.        GNU C compiler: 
  36.           ln -s /usr/local/bin/gcc gcc
  37.    c)  Type "make".
  38. REMARKS:
  39. i) Some compilers can compile the LEDA sources only if particular flags
  40.    are used. Examples are
  41.      sunpro c++ :   CC  -pto 
  42.      lucid  c++ :   lcc -XF
  43.    On other systems there seems to be a problem with calling the compiler 
  44.    through a sumbolic link as described above. 
  45.    In both cases you should create a shell-script "c++" instead of a symbolic
  46.    link in the LEDA main directory that calls the compiler with all supplied 
  47.    arguments and the required additional flags. Here is an example for sunpro
  48.    c++ using the default (Bourne) shell.
  49.      #!/bin/sh -f
  50.      CC -pto $*
  51. ii) The graphics library libWx.a is based on X11. It can be made only if
  52.     the main X11 include directory is located in one of the standard include 
  53.     directories of your compiler (e.g. /usr/include/X11). If this is
  54.     not the case you have to tell the compiler where it is by using the 
  55.     -I option. Here as an example working on most SUN workstations.
  56.   
  57.     #!/bin/sh -f
  58.     CC -pto -I/usr/openwin/include $*
  59.   
  60.   
  61. iii) Currently, the make scripts assume that the "ranlib" command is required 
  62.      to create a table of contents for every library. This is not true
  63.      for many operating systems. On such systems you will receive a lot of 
  64.      error messages "ranlib: command not found". You can simply ignore
  65.      these messages or remove the ranlib calls from <LEDA>/src/Make.src
  66.      
  67.    
  68. 2. INSTALLATION 
  69. ----------------
  70. a) Header Files
  71.   
  72.    All LEDA header files are contained in "<LEDA>/incl/LEDA".
  73.    You have to copy this directory to the C++ default include 
  74.    directory, e.g., 
  75.    AT&T CC:  cp -r <LEDA>/incl/LEDA /usr/include/CC
  76.    GNU g++:  cp -r <LEDA>/incl/LEDA /usr/local/lib/g++-include     
  77. b) Libraries
  78.    Copy the libraries to /usr/lib  or /usr/local/lib 
  79.    and run ranlib (if required by your system), e.g.,  
  80.    AT&T CC: cp <LEDA>/lib*.a /usr/lib
  81.             ranlib /usr/lib/lib[L,G,P,W]*.a
  82.    GNU g++: cp <LEDA>/lib*.a /usr/local/lib
  83.             ranlib /usr/local/lib/lib[L,G,P,W]*.a
  84.  
  85.    Then the -l option  can be used to compile and link programs
  86.    (see section 1.9 of the user manual):
  87.    CC (g++)  ... -lL -lm
  88.    CC (g++)  ... -lG -lL -lm      (for programs using graph data types)
  89.    CC (g++)  ... -lP -lG -lL -lm  (for programs using geometric data types)
  90.    for programs using windows:
  91.    CC (g++)  ... -lP -lG -lL -lWx -lX11 -lm
  92.    If you cannot write "/usr/(local/)include" and "/usr/(local/)lib"
  93.    on your system, you have to use the -I and -L compiler flags to 
  94.    compile and link LEDA programs:
  95.    CC (g++) -I<LEDA>/incl -L<LEDA>  ...
  96. 3. EXAMPLE PROGRAMS
  97. -------------------
  98.    Example programs can be found on  <LEDA>/prog, to compile them 
  99.    you have to use the following libraries:
  100.    <LEDA>/prog/basic:    -lL
  101.    <LEDA>/prog/graph:    -lG -lL
  102.    <LEDA>/prog/plane:    -lP -lG -lL -lm
  103.    <LEDA>/prog/window:   -lP -lG -lL -lWx -lX11 -lm 
  104.    <LEDA>/prog/demo:     -lP -lG -lL -lWx -lX11 -lm 
  105. 4. GRAPH ALGORITHMS
  106. -------------------
  107.    The source code for all graph algorithms (included in libG.a) can be 
  108.    found on <LEDA>/src/graph_alg
  109. 5. USER MANUAL
  110. --------------
  111.    All manual pages have been incorporated into the corresponding header
  112.    files. LEDA provides tools (see LEDA/manual/README) to extract and
  113.    typeset the user manual from these files. Postscript and LaTeX versions 
  114.    of the manual are available on the ftp server (ftp.mpi-sb.mpg.de).
  115.    The man directory also contains a simple interactive manual reader tman.
  116.    To use it you must have installed "gawk" or "nawk", LaTeX, and xdvi.
  117.    Probably, you have to change some path names in the "tman" script file.