home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / leda / install < prev    next >
Encoding:
Text File  |  1991-12-03  |  5.0 KB  |  154 lines

  1. *******************************************************************************
  2. *                                                                             *
  3. *                              LEDA 2.1                                       *
  4. *                                                                             *
  5. *                            INSTALLATION                                     *
  6. *                                                                             *
  7. *******************************************************************************
  8.  
  9.  
  10. In this file I use <LEDA_MAIN> to denote the path name of the LEDA main 
  11. directory. It should contain the following files and subdirectories: 
  12.  
  13. README                    informations about LEDA
  14. INSTALL                   this file
  15. Changes                   most recent changes
  16. Makefile                  make script
  17. incl/                     LEDA include directory
  18. src/                      LEDA source files
  19. prog/                     example programs
  20. man/                      user manual (TeX)
  21.  
  22.  
  23. IMPORTANT: To compile LEDA you must use AT&T cfront (2.0 or 2.1) or GNU g++
  24.            (1.37.1 or 1.40.3). Due to a bug in g++-1.39 it cannot be used !
  25.  
  26.  
  27. 1. HEADER FILES     (cf. section 1.8 of the user manual)
  28. ---------------
  29.   
  30.    All LEDA header files are in the directory   <LEDA_MAIN>/incl
  31.    You first have to  create a symbolic link with name "LEDA" to 
  32.    "<LEDA_MAIN>/incl" in the C++ default include directory, e.g., 
  33.  
  34.    (AT&T CC)       cd /usr/include/CC        
  35.                    ln -s <LEDA_MAIN>/incl LEDA
  36.    (GNU g++)
  37.                    cd /usr/local/lib/g++-include     
  38.                    ln -s <LEDA_MAIN>/incl LEDA
  39.  
  40.  
  41.    Alternatively, you could create a symbolic link "LEDA" to "<LEDA_MAIN>/incl"
  42.    in some directory <DIR> (e.g. <LEDA_MAIN>) and use the -I compiler flag, 
  43.    e.g., by replacing step b) in the following section by:  
  44.  
  45.    b) create a shell script "c++" in <LEDA_MAIN> containing the line:  
  46.  
  47.       g++ -I<DIR> $*   (CC -I<DIR> $* respectively) 
  48.  
  49.  
  50.  
  51. 2. LIBRARIES      (cf. section 1.9 of the user manual)
  52. ------------
  53.  
  54.    You have to make the following libraries:
  55.  
  56.    libL.a    (main  library)
  57.    libG.a    (graph library)
  58.    libP.a    (plane library)
  59.  
  60.    libWx.a   (xview window library)
  61.    libWs.a   (sunview window library)
  62.  
  63.  
  64.    a)  go to the LEDA main directory
  65.        cd <LEDA_MAIN>
  66.  
  67.    b)  Create a symbolic link "c++" to your C++ compiler
  68.        e.g., ln -s /usr/local/bin/g++  c++  (ln -s /bin/CC c++)
  69.  
  70.    c)  Type "make".
  71.  
  72.  
  73.  
  74.    Now link or copy the libraries to /usr/lib  or /usr/local/lib 
  75.    e.g.,  cd /usr/lib
  76.           ln -s <LEDA_MAIN>/lib*.a .  (If you use copies rerun ranlib !)
  77.  
  78.    (Alternatively you could use "-L<LEDA_MAIN>" compiler flag)
  79.  
  80.  
  81.    Then the -l option  can be used to compile and link programs
  82.    (see section 1.9 of the user manual):
  83.  
  84.    CC (g++)  prog.c -lL
  85.    CC (g++)  prog.c -lG -lL          (for programs using graph data types)
  86.    CC (g++)  prog.c -lP -lG -lL -lm  (for programs using geometric data types)
  87.  
  88.    for programs using windows:
  89.    CC (g++)  prog.c -lWs -lP -lG -lL -lsuntool -lsuntool -lpixrect -lm
  90.    CC (g++)  prog.c -lWx -lP -lG -lL -lxview -lolgx -lX11 -lm
  91.  
  92.  
  93.  
  94.  
  95. 3. EXAMPLE PROGRAMS
  96. -------------------
  97.  
  98.    Example programs can be found on  <LEDA_MAIN>/prog, to compile them 
  99.    you have to use the following libraries:
  100.  
  101.    <LEDA_MAIN>/prog/basic:    -lL
  102.    <LEDA_MAIN>/prog/graph:    -lG -lL
  103.    <LEDA_MAIN>/prog/plane:    -lP -lG -lL -lm
  104.  
  105.    <LEDA_MAIN>/prog/graphics: 
  106.  
  107.    sunview  (see Makefile.sunview)
  108.                           -lWs -lP -lG -lL -lsunwindow -lsuntool -lpixrect -lm 
  109.  
  110.    X11/xview  (see Makefile.xview)
  111.                           -lWx -lP -lG -lL -lxview -lolgx -lX11 -lm 
  112.  
  113.  
  114.  
  115. 4. GRAPH ALGORITHMS
  116. -------------------
  117.  
  118.    The source code for all graph algorithms (included in libG.a) can be 
  119.    found on <LEDA_MAIN>/src/graph_alg
  120.  
  121.  
  122.  
  123. 5. USER MANUAL
  124. --------------
  125.  
  126.    <LEDA/MAIN>/man contains all TeX sources for the LEDA user manual.
  127.    To make MANUAL.dvi call "tex MANUAL" in this directory, maybe you
  128.    have to change the values of "\hoffset" and "\voffset" in "MANUAL.mac". 
  129.    The man directory also contains a simple interactive manual reader:
  130.    csh-script "Lman". To use it you must have installed "gawk" or a 
  131.    compatible awk version, in the "Lman" script you must set variable 
  132.    "awk_cmd" to the name of your awk command and variable "man_dir" to 
  133.    the name of the LEDA man directory on your machine. Just call "Lman" 
  134.    without arguments for help. 
  135.  
  136.  
  137. 6. NOTE
  138. -------
  139.  
  140.    a) If you use AT&T cfront 2.? :
  141.       On Sun workstations the C preprocessor "cpp"  sometimes 
  142.       crashes on very large inputs with a segmentation fault or bus 
  143.       error.  You can solve this problem by replacing "cpp" by 
  144.       the GNU C-preprocessor "gcc-cpp" and by using the GNU C compiler 
  145.       "gcc" (set the environment variable ccC to "gcc" or change the CC 
  146.       shell script)
  147.    
  148.  
  149.    b) If you use g++-1.37.1, the sunview graphic stuff may not work 
  150.       with the malloc in libg++.a. To fix this problem, remove 
  151.       "malloc.o" from libg++.a
  152.  
  153.  
  154.