home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / COMPILER / SAMPLE03 / READ.ME < prev    next >
Text File  |  1993-03-15  |  3KB  |  58 lines

  1. The sample program SAMPLE03 can be built as a DLL with its own initialization/
  2. termination function. Furthermore, it is written such that it can be linked to
  3. the compiler libraries either statically or dynamically.
  4.  
  5. The files for the sample program are:
  6.  
  7. SAMPLE03.C        The source file for the functions in the DLL. It contains
  8.                   the code for:
  9.                   - Three sorting functions: bubble, insertion, and selection
  10.                   - Two static functions, swap and compare, that are called
  11.                     by the sorting functions
  12.                   - a function, list, that lists the contents of an array
  13.  
  14. INITTERM.C        The _DLL_InitTerm function. When called to perform
  15.                   initialization, this function gets storage for an array of
  16.                   integers, and initializes its elements with random integers.
  17.                   At termination time, it frees the array.
  18.  
  19. SAMPLE03.H        The file to be included by another source file which calls
  20.                   the functions in the SAMPLE03 DLL, or which references the
  21.                   external variables defined in the DLL. For example, MAIN03.C
  22.                   uses it.
  23.  
  24. SAMPLE03.DEF      The module definition file for the DLL.
  25.  
  26. SAMPLE3R.DEF      An alternate module definition file for the statically linked
  27.                   DLL. This definition file exports the compiler runtime
  28.                   functions so that all external references from MAIN03.C can
  29.                   be resolved by dynamically linking to the SAMPLE03 DLL.
  30.  
  31. MAIN03.C          The main program, which copies the unsorted array, and sorts
  32.                   it using each of the sort functions in the SAMPLE03 DLL.
  33.  
  34. MAIN03.DEF        The module definition file for the main program.
  35.  
  36.  
  37. To build the sample program, use the supplied make files:
  38.  
  39. MAKE03S           Builds SAMPLE03.DLL and MAIN03.EXE. The compiler libraries
  40.                   are linked statically.
  41.  
  42. MAKE03D           Builds SAMPLE03.DLL and MAIN03.EXE. The compiler libraries
  43.                   are linked dynamically.
  44.  
  45. MAKE03R           Builds SAMPLE03.DLL and MAIN03.EXE. The compiler runtime
  46.                   functions are included in SAMPLE03.DLL and exported so that
  47.                   all external references from MAIN03.C can be resolved by
  48.                   dynamically linking to the DLL.
  49.  
  50. For example:
  51.  
  52.     nmake all -f make03d
  53.  
  54. To clean up after the sample program has been built and run, type the following
  55. command:
  56.  
  57.     nmake clean -f make03d
  58.