home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / glock20c.zip / README.20C < prev   
Text File  |  1990-09-06  |  10KB  |  367 lines

  1.         Glockenspiel C++ 2.0c (DOS & OS/2) -  September 1990
  2.  
  3.                       R E A D M E   F I L E    
  4.  
  5.  
  6. This file describes: 
  7.  
  8.    .  Libraries
  9.    .  New features in Glockenspiel C++ release 2.0c
  10.    .  Microsoft keyword syntax restrictions
  11.    .  Switches update
  12.    .  Linker update
  13.    .  CL switches that are incompatible with C++
  14.    .  Quick C switches unsupported by Microsoft C6.0 and C++
  15.    .  Notes on Microsoft C header files
  16.    .  Re-implementing operators new and delete
  17.    .  Error codes 
  18.    .  Compatibility with Microsoft C version 5.1
  19.    .  Memory requirements
  20.    .  Quick Help databases
  21.    .  Using freestore classes under Windows
  22.    .  Intermittent error while handling errors
  23.    .  Install program
  24.  
  25.  
  26. Libraries
  27. ---------
  28.  
  29. Large model is the only memory model distributed with this release.  Floating
  30. point options are emulation or 80x87 calls with either the 'c' or pascal
  31. calling conventions.  The full list of distributed libraries is given below:
  32.  
  33.  
  34.                 LCXXCE.LIB
  35.                 LCXXPE.LIB
  36.                 LCXXC7.LIB
  37.                 LCXXP7.LIB
  38.  
  39.  
  40. The naming convention used is as follows:
  41.  
  42.     L           Large memory model
  43.  
  44.     CXX         The language type, C++
  45.  
  46.     C or P      C or pascal calling convention
  47.  
  48.     E or 7      Emulation or 80x87 math
  49.  
  50.  
  51. Support is given for Microsoft's -Lr and -Lp switches which distinguish 
  52. between Microsoft's real and protected mode libraries.  The default  C++ 
  53. library is LCXXCE.LIB while the default C library is LLIBCER.LIB for DOS 
  54. and LLIBCEP.LIB for OS/2.  The following flags invoke the corresponding 
  55. C++ libraries:
  56.  
  57.  
  58.     -FPi                LCXXCE.LIB
  59.     -FPc   
  60.  
  61.     -FPi87                LCXXC7.LIB
  62.     -FPc87
  63.  
  64.     -FPi -Gc            LCXXPE.LIB
  65.     -FPc -Gc 
  66.  
  67.     -FPi87 -Gc            LCXXP7.LIB
  68.     -FPc87 -Gc
  69.  
  70.  
  71. See your Microsoft documentation on the -FP flags for more information on 
  72. floating point options and the -Gc switch on controlling the calling 
  73. convention.
  74.  
  75.  
  76. New features in Glockenspiel C++ 2.0c
  77. -------------------------------------
  78.  
  79. The following features are not described elsewhere in the documentation
  80.  
  81.        - Microsoft extended keyword support
  82.  
  83.            The _export and _loadds keywords are now fully supported. 
  84.            They can be placed either in the class definition, the 
  85.            member function definition or both.
  86.      
  87.        - no limit on environment size with DOS/16M version
  88.     
  89.        - longest identifer now 31 to conform to Microsoft C
  90.     
  91.        - the _fastcall version of the C++ libraries has been
  92.          withdrawn and replaced by a _pascal version.
  93.    
  94.        - Bug fixes to the compiler
  95.  
  96.             - long case labels permissable
  97.             - 8 bit character support within strings
  98.             - type conversion from 0L to any pointer type
  99.             - miscellaneous bugfixes to  C++ pre-processor problems 
  100.               associated with 80x87 chips
  101.  
  102.  
  103. Microsoft keyword syntax restrictions
  104. -------------------------------------
  105.  
  106. With the exception of _loadds and _export the use of Microsoft extended 
  107. keywords is restricted to within the extern "C" {} construct, eg:
  108.  
  109.     extern "C" {
  110.         int _far  someFarFunc ( ... ) ;
  111.         int _near someNearFunc ( ... );
  112.     }
  113.  
  114.  
  115. Switches update
  116. ---------------
  117.  
  118.  *  Memory models 
  119.  
  120.     Large model is the only model supported in this release.
  121.  
  122.  *  ANSI function prototyping
  123.  
  124.      By default ANSI function prototyping is switched on (+A1) and
  125.     can be switched off by using the +A0 switch.
  126.  
  127.  
  128.  *  DLL support switches
  129.  
  130.     !U        Invokes the DLL library at link time.  For Windows
  131.             this defaults to LDLLCE.LIB and LLIBCDLL.LIB for
  132.             Presentation Manager.
  133.    
  134.     +MU        Ensures the virtual table is set up correctly for objects 
  135.             constructed in the DLL's data segment.
  136.  
  137.  
  138.    
  139. *   Debug options (!Dopt)
  140.  
  141.     !D(opt) - Debug Options for C++ debugging
  142.               (opt) == 1, 2, 4 and 6 
  143.    
  144.     These options provide a comprehensive debugging environment plus PWB
  145.     support.  For more information see the booklet on using PWB with 
  146.     C++ 2.0.
  147.  
  148.  
  149. Linker update
  150. -------------
  151.  
  152.     Linker response files can now be passed to the compiler driver on the
  153.     command line.  These must have either an LNK or ILK file extension.  
  154.     If the LNK suffix is used the standard linker will be invoked while ILK 
  155.     invokes the incremental linker.  
  156.    
  157.  
  158. CL switches that are incompatibe with C++
  159. -----------------------------------------
  160.  
  161.    
  162.    -B1 -B2  Invoke alternative compiler passes
  163.    -B3 
  164.    
  165.    -Gi      Compile incrementally
  166.    -J       Change default char type from signed to unsigned
  167.    -Lc      Same as -Lr
  168.    -Li      Invoke the incremental linker ILINK
  169.    -MA      Invoke MASM
  170.    -S*      See Microsoft C compiler documentation
  171.    -Tc      Source file does not have '.C' extension
  172.    -WX      Makes all warnings fatal
  173.    -Zg      Generates function prototypes to stdout 
  174.    
  175. The following three switches are not supported by C++ but their
  176. equivalents are:
  177.  
  178.     Switch  Equivalents
  179.         
  180.     -MD    -ALw -Fpi -G2 -DMT -DDLL                           (OS/2 Only)
  181.     -ML    -ALw -Fpa -G2 -DMT : Link with LLIBCDLL.LIB        (OS/2 Only)
  182.     -MT    -ALw -Fpa -G2 -DMT : Link with LLIBCCMT.LIB        (OS/2 Only)
  183.  
  184.  
  185.  
  186. Quick C switches unsupported by Microsoft C6.0 and C++
  187. ------------------------------------------------------
  188.  
  189. The Microsoft Quick C compiler is invoked by the use of -qc on the command
  190. line.  The following switches should not be used in conjunction with -qc:
  191.  
  192.     -Ow , -Gm , -Fa , -Fc , -Fl , -Fs , -FPa , -FPc , -FPc87 , -H , -Zc
  193.  
  194.  
  195. Notes on Microsoft C header files
  196. ---------------------------------
  197.  
  198. The file DOS.H (line 68) contains the structure DOSERROR which has a
  199. member called class.  As this conflicts with the C++ keyword of the same
  200. same name, it is advisable to change the identifier class.
  201.  
  202.    struct DOSERROR
  203.    {
  204.        int exterror;
  205.        char err_class;        // Changed from 'char class;'
  206.        char action;         
  207.        char locus;
  208.    };
  209.  
  210. The MATH.H header file (line 45) contains a structure called complex which
  211. conflicts with the C++ complex class.  Conditionally exclude this struct by 
  212. using the '__cplusplus'  manifest constant.
  213.  
  214.    #ifndef __cplusplus        // Wrap the struct using '__cplusplus'
  215.    #ifndef _COMPLEX_DEFINED
  216.  
  217.    struct complex
  218.    {
  219.        double x, y; /* real and imaginary parts */
  220.    };
  221.  
  222.    #define _COMPLEX_DEFINED
  223.    #endif    // __cplusplus
  224.  
  225.  
  226. Re-implementing operators new and delete 
  227. ----------------------------------------
  228.  
  229. The code for the distributed implementation of operators new and delete is 
  230. given below.  If requried, the implementation details can be re-written and 
  231. linked in with applications.  To avoid multiple definitions of new and 
  232. delete pass the /NOE switch to the linker.
  233.  
  234.  
  235. Source code for new.cxx
  236.  
  237.    typedef void (*PFVV)();
  238.    extern PFVV _new_handler;
  239.    extern "C"
  240.    {
  241.        #include <malloc.h>
  242.    }
  243.    #include <new.hxx>
  244.    
  245.    extern void *    operator new ( size_t size )
  246.    {
  247.        void *    _last_allocation;
  248.        while ( ( _last_allocation = malloc ( unsigned(size))) == 0 )
  249.        { 
  250.            if ( _new_handler )
  251.                (*_new_handler)();
  252.            else
  253.                return 0;
  254.        }
  255.        return _last_allocation;
  256.    }
  257.    
  258. Source code for delete.cxx
  259.  
  260.    extern "C" 
  261.    {
  262.        #include <malloc.h>
  263.    }
  264.    extern  void operator delete ( void * p )
  265.    {
  266.        if ( p )
  267.            free ( (char*)p );
  268.    }
  269.  
  270. Source code for placenew.cxx
  271.  
  272.    #include <new.hxx>
  273.    
  274.    void *  operator new ( size_t, void * p )
  275.    {
  276.        return p;
  277.    }
  278.  
  279.     NEW.HXX is a distributed header file.
  280.  
  281.  
  282. If writing DLLs, change the FreeStore version of new and delete and remake
  283. the FreeStore DLL.
  284.     
  285. For further information consult Programming in C++ by Stephen C. Dewhurst 
  286. and Kathy T. Stark, Chap 7, sec 7.2.
  287.  
  288.  
  289. Error codes
  290. -----------
  291.  
  292. A listing of errors codes is provided in the ERRORS.MSG file.   All error
  293. numbers are preceded by an alpha character indicating the compiler phase in
  294. which the error occured.
  295.  
  296.  
  297. Compatibility with Microsoft C version 5.1
  298. ------------------------------------------
  299.  
  300. The libraries provided with Glockenspiel C++ 2.0c are compatible with 
  301. Microsoft C 5.1 with the exception of floating point routines. 
  302.  
  303.  
  304. Memory requirements
  305. -------------------
  306.  
  307. Glockenspiel C++ 2.0c on DOS is implemented using Rational System's
  308. DOS Extender, and will only run on 80286 or 80386 based machines with
  309. 640K of base memory and a minimum of one megabyte of extended memory.
  310.  
  311. When driving a build using NMAKE scripts under DOS, it is recommended 
  312. that you drive the build from within PWB or  use Microsoft's NMK utility.
  313.  
  314.  
  315. Quick Help databases
  316. --------------------
  317.  
  318. There are two hypertext databases provided with C++ 2.0c, the on-line 
  319. C++ Reference Manual and FreeStore class documentation.  Both CXXSYN.HLP 
  320. and FREESTOR.HLP are in Microsoft Quick Help format and can be used with 
  321. either Microsofts QH.EXE program or the Programmer's Workbench help facility. 
  322.  
  323.  
  324. Using freestore classes under Windows
  325. -------------------------------------
  326.  
  327.    To develop under Windows 3.0 without CommonView freestor.hxx must be
  328.    included and the following line added to the start of WinMain():
  329.  
  330.       WindowsFS fs;
  331.  
  332.    If writing a DLL using the Glockenspiel Container framework the 
  333.    following rule applies :
  334.  
  335.       LocalAllocator must not be used as the FreeStore for the
  336.       container.
  337.     
  338.    This restriction will be removed in future releases of Container.
  339.  
  340.  
  341. Intermittent error while handling errors
  342. ----------------------------------------
  343.  
  344. If the error codes -7 under OS/2 and 216 under DOS are encountered, this
  345. indicates that syntactically incorrect code has been passed through to
  346. the compiler.  To obtain the line number of the error, use the +lx switch
  347. on the command line.
  348.  
  349.  
  350. Install program
  351. ---------------
  352.  
  353. The installation program used to install Glockenspiel C++ 2.0c is licensed
  354. software provided by:
  355.  
  356.     Knowledge Dynamics Corporation, 
  357.     Highway Contract 4 Box 185-H, 
  358.     Canyon Lake, Texas 78133-3508 (USA).
  359.     
  360.     Phone: 1-512-964-3994
  361.  
  362. INSTALL is Copyright (c) 1987-1989 by Knowledge Dynamics Corporation
  363. which reserves all copyright protection worldwide. INSTALL is provided 
  364. for the exclusive purpose of installing GLOCKENSPIEL C++ 2.0c.
  365.  
  366.  
  367.