home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
QBAS
/
PRQLB123.ZIP
/
PREQLB.DOC
next >
Wrap
Text File
|
1991-02-18
|
9KB
|
176 lines
Pre-QLB 1.22
Copyright (c) 1989/1990 MicroHelp Inc.
Licensing:
This program is Copyrighted by MicroHelp Inc. and was originally
released in our QB-Pro Volume 8. It is now being placed into the
Public Domain to assist you in creating your quick libraries.
This program can be freely distributed as long as it is not modified
in any way. The PreQlb.zip file should contain the current executable
file and this PREQLB.DOC file. If you discover any problems with this
program we definitely want to know about them; however, only registered
users of QB-Pro Volume 8 can receive tech support on this program.
If you want further information on our line of BASIC add-in libraries
and other products, please call us at 1-800-922-3383 or in GA at
(404) 552-0565. If you discover a problem with PreQLB, you can write
to us at 4636 Huntridge Dr. Roswell, GA 30075.
Overview:
PreQLB is used to automatically build a Quick Library containing
only those externals needed by a program. PreQLB parses the BASIC
source code checking for specific statements that identify the names
of external routines used in your program. It then creates a file with
a .BQL extension that is passed to the LINKer to create the needed .QLB.
All of the externals that are required for your program are extracted
from a list of specified .LIB files to create the quick library. Only
.LIB files can be searched by PreQLB, you can not pass it the name
of individual object filenames. (You can pass object modules using the
#TrailingObject command described below).
Usage:
PreQLB can be operated from the command line or through a one page
data entry screen.
The syntax is "Preqlb [?] [Filename] [/L] [/Q]".
Passing the "?" will display a help screen that gives the proper syntax
and a brief usage summary.
The /L switch will create a list file with the same name as your Filename
and the .LST extension. This listing will contain the names of all the
external routines in the Quick Library created by PreQLB.
The /Q switch instructs PreQLB to process $INCLUDE files one time.
If your program has multiple modules and the same $INCLUDE is listed in
more than one of these modules, the /Q switch tells PreQLB to search for
externals in this $INCLUDE file only on the first time that it is processed.
If you receive an "Unresolved Externals" error message from the linker,
then run PreQLB without the /Q switch.
Filename is the name of your BASIC source file, (it MUST be in ASCII)
and the extension is not required. PreQLB looks for files in the
following order. First: .MAK files. If a make file is found, PreQLB
will process every module listed in the file. If a .MAK file is not
found, PreQLB then looks for a .BAS file. If your file has an extension
other than .MAK or .BAS, you must pass the complete filename on the
command line. Additionally, PreQLB will look for a .CFG file. This
configuration file is created by the input routine, (explained below)
and contains the names of the source file (or make file), the support
library, the quick library, and up to five link libraries with their
respective paths.
While parsing the file(s), PreQLB looks for three special PreProcessing
commands: #Libraries, #SupportLib and #TrailingObject. The proper syntax
for these commands is:
'#Libraries: 'C:\PDS\LIB\MHLIB2'
'#SupportLib: 'C:\PDS\LIB\QBXQLB'
'#TrailingObject: 'C:\PDS\OBJ\MHMISCPX'
Please note that the leading and trailing apostrophes (') are REQUIRED.
You can have up to 20 #Libraries and 20 #TrailingObject statements in your
files, but only one #SupportLib. If you have more than 20 #Libraries
or #TrailingObject statements, all over 20 are not processed and only
the LAST #SupportLib is maintained.
The #SupportLib command refers to the Quick Library support library.
For BC 7.x this is QBXQLB.LIB, for QB 4.x it is BQLB4x.LIB. This file
is distributed with your Microsoft compiler.
The #Libraries command refers to linkable libraries (.LIB file extension),
that contain the routine(s) that you are using in your program.
The #TrailingObject command allows you to pass the name of object modules
to be included in your Quick Library. You can use this command to include
customized object modules for individual programs without having to remove
the object module with the same name from your linkable library. If you
are a MicroHelp customer, then you can use this option to pass the name of
the proper near or far string support module (MHMISCP or MHMISCPX).
If you enter PREQLB without command line options, an input screen will
appear that allows you to enter the names of the source or make file,
the support library, five link libraries and the quick library. The
source file is the name of your source or make file with the path if
desired. If your source has a .BAS or .MAK extension, then the
extension is NOT required. You can also select the /Q and /L option
switches explained above.
Pressing the F2 key from the input screen will cause the quick library
to be built using the options entered. PreQLB will check to make sure
it can find the support and link libraries in the path provided or in
the LIB environment variable path. If one of these libraries can not
be found, an error message will appear and you will remain in the input
screen. You must then provide the proper path or update your LIB
environment variable.
PreQLB will check the DOS environment for the presence of a "INCLUDE="
environment variable, and will search this path as well as the current
directory for $INCLUDE files.
The only fields that MUST be filled in are:
1) The source file name
2) The support library name
All of the other fields are optional.
PreQLB will then create two files called Preqlb.rsp and PQ.bat that
are used to create the quick library. These files are not deleted
when the operation is finished, so you could use them to rebuild the
library again without running PreQLB. PQ.bat simply invokes the
linker, passing it the necessary responses in the Preqlb.rsp file.
You can save this configuration information by pressing the F9 key.
You will be prompted for a filename, the default being the same as
your source file without an extension. PreQLB will then save all
of the information on the input screen in this file with a ".CFG"
extension. The next time you need to build a quick library for this
program, you can use the command line option and PreQLB will
read the .CFG file.
Speed Tips:
1) Use the special pre-processing commands in your code to
identify the names of the support library, link libraries and
any trailing object modules your quick library will need. Then
type PREQLB <program.name>. PreQLB will obtain all the information
it needs directly from you source code and you will have a permanent
reference of what libraries and files are needed for this program.
2) If you have a multi-module program where more than one module
uses the same $INCLUDE file(s) and these $INCLUDE file(s) only need
to be processed once, then make sure you use the /Q switch. This switch
can be passed on the command line "PREQLB <programname> /Q", or saved
in a .CFG file from the input screen. If you use this switch and
receive an "Unresolved Externals" error message from the linker, then
run PreQLB again without the /Q switch and the quick library should
be created successfully.
3) If you are building quick libraries for large programs that utilize
several link libraries and you have a RAM disk: Copy your link
libraries, source code and PreQLB to the RAM disk and run the program
there. The speed increase can be significant. To automate this process,
create a small batch file that copies the necessary files to the RAM
disk and optionally starts PreQLB.
Version 1.21
01-15-91: If PreQLB was run from command line without a .CFG file, the
PQ.RSP file could contain an invalid Quick Library Name (the
filename had only the .QLB extension).
The maximum number of references was increased from 300 to 500.
Version 1.22
02-13-91: If a DECLARE had more than one space between the keyword and the
procedure name, a "nul" procedure name was being placed in the
.bql file. This would not happen if the .DEC file or source file
was ever loaded into the QB/QBX environment and saved, since QB
would trim the blank spaces.
If you updated the LIB environment variable, it was not being passed
in the batch file. We now APPEND any changes to your existing LIB
environment variable (if any).
Added the ability to abort the program while the source files are
being read by pressing the Escape key, with a Yes/No verify option.