home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 287_02 / tc_inst.doc < prev    next >
Text File  |  1989-05-25  |  4KB  |  83 lines

  1.      The GRAD library in the distribution file is for HGA in full mode and 
  2. EPSON FX-80 or compatible printers (including IBM graphics printer). If your 
  3. system configuration is the same as the default configuration, you may skip 
  4. the next section and read the section "Compiling the GRAD sample programs".
  5.  
  6. INSTALLING GRAD LIBRARY
  7.  
  8.      To install GRAD library, you need the LIB (library manager) program from 
  9. the Microsoft C compiler utility diskette or compatible ones. If you do not 
  10. have the program, you may still use GRAD library. Read the last section on how 
  11. to use GRAD library without installation.
  12.  
  13.      If you are using HGA in half mode, you should extract the file from 
  14. HERCHALF.ARC and then type the commad:
  15.  
  16.         LIB gradlib,-+calcaddr,,gradlib
  17.  
  18.      If you are using CGA, you should extract the files from COLOR.ARC and 
  19. then type the command:
  20.  
  21.         LIB gradlib,-+calcaddr-+plottype-+ftable,,gradlib
  22.  
  23.      Similarly, if you want to use the OKIDATA ML192 printer driver, extract 
  24. all the files from OKI.ARC and then type the command:
  25.  
  26.         LIB gradlib,-+prtcntl-+prtgc-+pframe,,gradlib
  27.  
  28. After installing the library, you have to copy GRADLIB.LIB to the appropriate 
  29. place so that the linker can find the GRADLIB.LIB at link time.
  30.  
  31.  
  32. COMPILING SAMPLE PROGRAMS
  33.  
  34.      If you already have the executable files of the sample programs for your 
  35. system configuration, you do not need to compile the source files and you may 
  36. skip over this section.
  37.  
  38.      To compile the sample programs, you need the Turbo C compiler 
  39. version 1.0 with the small model library and GRAD library (GRADLIB.LIB) 
  40. installed. You also need to create a dummy file "sys\types.h" because some 
  41. of the sample program requires that file but Turbo C does not have this header 
  42. file.
  43.  
  44.      Seven programs with source listing and one program with object module 
  45. only are included. Three of them (interp, mprint and swprt) requires the GRAD 
  46. library and others are utility programs for GRAD system and GRAD library is 
  47. not required.
  48.  
  49. To compile interp, mprint and swprt, use the following commands:
  50.         tcc -O -r -Z -f- -K -a interp.c execfunc.obj gradlib.lib
  51.         tcc -O -r -Z -f- -K -a mprint.c execfunc.obj gradlib.lib
  52.         tcc -O -r -Z -f- -K -a swprt.c gradlib.lib
  53.  
  54. To compile other programs, type:
  55.         tcc -O -r -Z -f- -K -a tex2grad.c
  56.         tcc -O -r -Z -f- -K -a rotate.c
  57.         tcc -O -r -Z -f- -K -a size.c
  58.         tcc -O -r -Z -f- -K -a time.c
  59.         link dispfont,dispfont,nul,gradlib;
  60.  
  61.  
  62. USING GRAD LIBRARY WITHOUT INSTALLATION
  63.  
  64.      If you don't have the LIB program or you don't want to use the driver in 
  65. the library for whatever reason, you can force a certain driver to be included 
  66. in your program instead the one in the library by including their names in 
  67. linking. For example, if you want to compile swprt using OKIDATA ML192 driver, 
  68. you should extract the files from OKI.arc and use the command:
  69.  
  70.         tcc -O -r -Z -f- -K -a swprt.c prtcntl.obj pframe.obj prtgc.obj
  71.                          gradlib.lib
  72.  
  73. Similarly if you you want to use any other drivers, place the names of the 
  74. object files of the driver in the command line during compilation or linking.
  75.  
  76.      You only need to include the display driver only if you use the graphics 
  77. display screen. And you will need the printer driver only if you the function 
  78. PrintFrame.
  79.  
  80.      In the sample programs, interp, mprint and swprt requires a printer 
  81. driver and interp, dispfont needs a display driver.
  82.  
  83.