home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / libg_ / libgpp / !libgpp / docs / !Readme next >
Encoding:
Text File  |  1996-11-16  |  4.3 KB  |  136 lines

  1. The GNU C++ library
  2. ===================
  3.  
  4. Introduction
  5. ------------
  6.  
  7. This is a port of the GNU C++ library (version 2.7.2) for use with the
  8. C++ programming language to the Acorn range of ARM based machines, running
  9. under RISC OS. As such, this package is covered by the FSF General
  10. Public License (see the files docs.COPYING and docs.COPYINGLIB for details).
  11.  
  12. This port is © 1996 Nick Burrett
  13.  
  14. As with GNU programs, THERE IS NO WARRANTY OF ANY SORT
  15.  
  16.  
  17. Files
  18. -----
  19.  
  20. This distribution does not include any of the C++ source files. For these
  21. you must retrieve them from a suitable GNU archive site listed at the end
  22. of this document.
  23.  
  24. libgpp:h contains all the header files
  25. libgpp:o.libg++ is the library file to link against.
  26. !libgpp.docs.libg++ contains full instructions for this library
  27. !libgpp.docs.!Readme is this document.
  28.  
  29. !libgpp.gen.hp and !libgpp.gen.cpp are C++ source for the generated
  30. classes.  Please read the full library instructions for information on
  31. how to use genclass.
  32.  
  33.  
  34. Installation
  35. ------------
  36.  
  37. To install the GNU C++ library, just copy the directory !libgpp onto your
  38. hard disc. Double clicking on !libgpp will then setup the relevant path
  39. variables to point to !libgpp.
  40.  
  41.  
  42. Before attempting to use the GNU C++ library, it should be noted that you
  43. will need the GNU C++ compiler. A library file has not been created for
  44. use with Acorn C++, since I do not have the package.
  45.  
  46. If you do not have a copy of GNU C++, it can be retrieved from the files
  47.   ftp://micros.hensa.ac.uk/micros/arch/riscos/b/b013/gccmain.zip
  48.   ftp://micros.hensa.ac.uk/micros/arch/riscos/b/b013/cc1plus.zip
  49. and relevant mirrors.
  50.  
  51. The GNU C++ library requires:
  52.  
  53.   a) The C runtime library, UnixLib 3.7b or later.
  54.     ftp://micros.hensa.ac.uk/micros/arch/riscos/a/a042/unixlib.arc
  55.     or http://www.callan.demon.co.uk/unixlib
  56.  
  57.  
  58.   b) The two other GNU C++ class libraries that came in this package:
  59.        The GNU ANSI C++ Library (or LibStdc++)
  60.        The GNU IOStream library (libio)
  61.  
  62.   c) If using the regular expression class (Regex) then you will also
  63.      require Librx.
  64.  
  65.  
  66. Using the GNU C++ library
  67. -------------------------
  68.  
  69. In general usage, all that is needed is an extra three command line options
  70. to G++:
  71.   -ILibgpp: -ILibstdc: -ILibio:
  72. and in that particular order. Rearranging the order will cause file resolving
  73. problems between Libgpp and Libstdc.
  74.  
  75. Linking against the GNU C++ library will also mean linking against the
  76. GNU ANSI C++ library and the GNU IOStream library, so libgpp:o.libg++,
  77. libstdc:o.libstdc++ and libio:o.libio should be included on the linker
  78. command line.
  79.  
  80.  
  81. As an example in general use: to compile file cc.fib:
  82.   g++ -c cc.fib -O2 -ILibgpp: -ILibstdc: -ILibio:
  83.   drlink -o fib o.fib libgpp:o.libgpp libstdc:o.libstdc++ libio:o.libio
  84. gcc:o.libgcc unix:o.unixlib
  85.  
  86. should be sufficient. Although adding -rescan to the drlink command line
  87. might help resolve missing link references.
  88.  
  89. When using the class Regex, it is necessary to include Librx on
  90. the search path with the extra command line option:
  91.   -ILibrx:
  92. and specify librx:o.librx on the linker command line.
  93.  
  94.  
  95. Using genclass
  96. --------------
  97.  
  98. genclass is a binary used for translating the container class prototypes
  99. stored in the gen directory.  Full instructions can be obtained from
  100. the libg++ main document.
  101.  
  102. Due to the filename restrictions of RISC OS resultant C++ source and header
  103. files will be buried within sub-directories. e.g.
  104.  
  105.   For basic container classes:
  106.      genclass base [val,ref] proto
  107.  
  108.   output will be stored in directory 'base' in the current directory,
  109.   with filename 'proto'.
  110.   
  111.   e.g. genclass int val List
  112.   generates int.h.List and int.cc.List
  113.   
  114.   For classes like dictionaries and maps that require two types:
  115.     genclass -2 keytype [val,ref] basetype [val,ref] proto
  116.  
  117.   e.g. genclass -2 String ref int val VHMap
  118.   generates String.int.h.VHMap and String.int.cc.VHMap
  119.   
  120.   output 'proto' will be stored in directory 'basetype' which in turn
  121.   is located within directory 'keytype'.
  122.  
  123. Directories must also be pre-created before running genclass.
  124.   
  125. These inconviences are a necessity at the moment but it's quite possible
  126. to hand edit the files as you wish.
  127.  
  128.  
  129. Contacting me
  130. -------------
  131.  
  132. I can be contacted by e-mail at: nickb@digibank.demon.co.uk
  133.  
  134. However, if there is no response from that address I can be contacted
  135. through Simon Callan: gcc@callan.demon.co.uk.
  136.