BBS: Inland Empire Archive
Date: 04-08-92 (09:13) Number: 39
From: ROB SMETANA @ 914/201 Refer#: NONE
To: CHRIS HOWARD Recvd: NO
Subj: Re: Libraries Conf: (2) Quik_Bas
> forgive the simpleness of my question, but what benefit do you get
> from linking a program to a library ? I have not managed to read the
> manuals yet, but from reading some of these messages, I can see they
> are an important part of programming. Can someone give me a beginners
> view of what these libraries are and how they are used. Any response
> would be greatly appreciated.
First, Chris, if you plan to compile a pgm to an EXE you MUST link
with at least 1 library: BCOMXX (or BRUNxx or PDS 7.x equivalents).
These LIB files contain BASIC's 'facilities' to handle all of the
functions and statements you use (PRINT, OPEN, DATA, LOCATE, etc.).
And when you LINK your program, you can include other LIB files as
well -- which would contain 3rd party procedures (or your own
procedures which you've tested, compiled to OBJ form, then added
to a LIB file). Again, the LIB simply contains the
you've used in your program. In order to get 'em into your
EXE, you must tell LINK to look for procedures used in your program,
and then add-to-your-EXE anything it needs from the LIB files.
As to your 2nd question (which you didn't ask), the other type of
LIBRARY (or a .QLB file). Like LIB files, QLB files contain
procedures (SUBs or FUNCTIONS) you'll invoke in a program you're
* When you run QB, you load the QLB file with the "/l" switch:
qb myprog.bas /l qb (loads qb.qlb)
* This is the ONLY way to get access to ASM routines, or 3rd-
party routines (that you got in OBJ form), or SUBS/FUNCTIONS
you've written and compiled -- WHILE you're developing a
Creating LIB and QLB files is v-e-r-y easy using the LIB.EXE and
LINK.EXE programs that came with QB. For example:
* QB includes a LIB file called QB.LIB. To convert it to a
QLB file: link /q qb.lib,,nul,bqlb45;
- "/q" means create a Quick Library (rather than an EXE)
- "bqlb45" is the "core" set of facilities needed for QLBs.
Hope this gets you started. If you need details, holler.
--- RBBSMail 17.3A
# Origin: PCUG BBS - San Francisco HST/V.32 415-621-2609 (RBBS 8:914/201.0)
* Origin: Gateway System to/from RBBS-NET (RBBS-PC 1:10/8)