home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / mathwiz.zip / LIBRARY.TXT < prev    next >
Text File  |  1991-01-04  |  3KB  |  58 lines

  1. So you've never used a library before and you want to know what gives?
  2.  
  3. A library is a collection of routines, whether written in BASIC, assembly
  4. language, or some other language altogether.  It provides a convenient way to
  5. allow different programs to use the same sets of standard or special-purpose
  6. routines (subprograms or functions, in BASIC parlance).  Only the library
  7. routines that you actually use will be combined with your program.
  8.  
  9. There are two forms of libraries for QuickBASIC.  The form with the extension
  10. ".LIB" is for use with LINK, for creating stand-alone programs which do not
  11. require the QuickBASIC environment.  This sort of library can be made or
  12. manipulated using the LIB utility provided with QuickBASIC.  The form of
  13. library with the extension ".QLB" is for use in the QuickBASIC environment.
  14. It is created with LINK and (unfortunately) can't be manipulated at all.
  15.  
  16. To use a QLB library, you specify the /L parameter when starting up QB:
  17.    QB /L MATHWIZ
  18. You can optionally include the name of your program before the /L switch.
  19.  
  20. To use a LIB library, you specify the name of the library when you LINK your
  21. program.  Either let LINK prompt you for the library or type something like
  22. this:
  23.    BC program/O;                       (or whatever)
  24.    LINK program/EX,,NUL,MATHWIZ
  25.  
  26. If you are in the QuickBASIC environment and direct the compiler to produce
  27. an .EXE file, it will automatically link the library for you if you started
  28. up QB with the /L option.
  29.  
  30. Suppose you have more than one library that you wish to use?  Well, provided
  31. that you have both of the libraries in .LIB form, this presents no problem.
  32. To use the .LIB libraries, just use a plus sign between their names at LINK
  33. time:
  34.    LINK program/EX,,NUL,BASWIZ+MATHWIZ
  35.  
  36. To create a combined .QLB library, use a plus sign between their names when
  37. creating the new .QLB file:
  38.    LINK BASWIZ.LIB+MATHWIZ.LIB/Q,,NUL,BQLB45
  39.  
  40. The last two digits of "BQLBxx" represent the version of the compiler that
  41. you have.  It doesn't necessarily match the formal version number, though, so
  42. you might just want to use DIR and see what the name of the file really is.
  43. BQLBxx.LIB is one of the files that comes with QuickBASIC.
  44.  
  45. If you experience a LINK error, make sure that you're using the current
  46. version of LINK.  I've heard from many people who turn out to have the wrong
  47. version of LINK in their PATH somewhere... when LINK starts up, it will
  48. display its version number on the screen.  The version should be around 3.69
  49. as of QuickBASIC 4.5.  You must use the LINK that came with QuickBASIC-- the
  50. one that comes with Quick C is incompatible and the one that came with BASCOM
  51. 6.0 (the one with two periods in the version number) has a few bugs.
  52.  
  53. There is also a nasty bug in the LINK that came with BASCOM 7.0.  If you have
  54. that version of LINK, make sure you don't abort the linking process by Ctrl-C
  55. or Break!  If you do, your hard drive may be trashed, requiring reformatting!
  56.  
  57. All clear?  No?!  Check your QuickBASIC manual for more information!
  58.