home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / basic / baswiz18.zip / LIBRARY.TXT < prev    next >
Text File  |  1990-04-15  |  3KB  |  50 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).
  7.  
  8. There are two forms of libraries for QuickBASIC.  The form with the extension
  9. ".LIB" is for use with LINK, for creating stand-alone programs which do not
  10. require the QuickBASIC environment.  This sort of library can be made or
  11. manipulated using the LIB utility provided with QuickBASIC.  The form of
  12. library with the extension ".QLB" is for use in the QuickBASIC environment.
  13. It is created with LINK and (unfortunately) can't be manipulated at all.
  14.  
  15. To use a QLB library, you specify the /L parameter when starting up QB:
  16.    QB /L BASWIZ
  17. You can optionally include the name of your program before the /L switch.
  18.  
  19. To use a LIB library, you specify the name of the library when you LINK your
  20. program.  Either let LINK prompt you for the library or type something like
  21. this:
  22.    BC program/O;                       (or whatever)
  23.    LINK program/EX,,NUL,BASWIZ
  24.  
  25. If you are in the QuickBASIC environment and direct the compiler to produce
  26. an .EXE file, it will automatically link the library for you if you started
  27. up QB with the /L option.
  28.  
  29. Suppose you have more than one library that you wish to use?  Well, provided
  30. that you have both of the libraries in .LIB form, this presents no problem.
  31. To create a combined .LIB library, use the LIB utility to extract all of the
  32. .OBJ files from one .LIB and add them to the other one.  You can convert the
  33. new combined library to .QLB form by using a special LINK syntax:
  34.    LINK combined.LIB/Q,,NUL,BQLB45
  35.  
  36. The last two digits of "BQLBxx" represent the version of the compiler that
  37. you have.  It doesn't necessarily match the formal version number, though, so
  38. you might just want to use DIR and see what the name of the file really is.
  39. BQLBxx.LIB is one of the files that comes with QuickBASIC.
  40.  
  41. If you experience a LINK error, make sure that you're using the current
  42. version of LINK.  I've heard from many people who turn out to have the wrong
  43. version of LINK in their PATH somewhere... when LINK starts up, it will
  44. display its version number on the screen.  The version should be around 3.69
  45. as of QuickBASIC 4.5.  You must use the LINK that came with QuickBASIC-- the
  46. one that comes with Quick C is incompatible and the one that came with BASCOM
  47. 6.0 (the one with two periods in the version number) has a few bugs.
  48.  
  49. All clear?  No?!  Check your QuickBASIC manual for more information!
  50.