home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 01e / lib_link.zip / LIB&LINK.TXT < prev    next >
Text File  |  1987-12-03  |  19KB  |  453 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                          ****************************
  26.                          *                          *
  27.                          *    LIBRARY and LINKER    *
  28.                          *                          *
  29.                          *          UTILITY         *
  30.                          *                          *
  31.                          ****************************
  32.                                                   
  33.                                                   
  34.                                                   
  35.      
  36.      
  37.      
  38.      
  39.      
  40.                                                   
  41.                                                   
  42.                                                   
  43.                                                   
  44.                                                   
  45.                                                   
  46.                                                   
  47.                                                   
  48.      
  49.      
  50.                                                   
  51.      
  52.      
  53.                                                   
  54.                                  Gary LaRonge
  55.                           11436 Littlerock Rd. S.W.
  56.                              Olympia, Washington
  57.                                     98502
  58.                                                   
  59.                                                   
  60.                                                   
  61.                                                      
  62.                                                      
  63.                                                      
  64.                                                      
  65.                                                      
  66.                                                      
  67.                            
  68.         
  69.         
  70.                            
  71.                                 -INTRODUCTION-
  72.                                                      
  73.                                                      
  74.            This program is a utility for Microsoft's (tm) LIB.EXE and 
  75.        LINK.EXE, two utilities published by Microsoft Corporation that 
  76.        create and modify library files used with the linker and to chain 
  77.        library files together, respectively.
  78.                                                      
  79.            Those of you that have used either LIB.EXE or LINK.EXE will 
  80.        already understand the need for "another way", particularly in 
  81.        the case of LIB.EXE. For those of you that haven't used LIB.EXE, 
  82.        try it and then you too will see what a problem it is to use.  
  83.        After typing in 50 or 75 filenames to be included in your library 
  84.        only to have LIB.EXE crash can be depressing. Hopefully LIB&LINK 
  85.        will solve those types of problems.
  86.                                                      
  87.            The LIBRARY module of LIB&LINK is used to create a library, 
  88.        add files to, delete files from, or replace files within an 
  89.        existing library, while the LINK module is used to create an 
  90.        [.EXE] file using the [.OBJ] files contained within your library.              
  91.                                         
  92.            I must emphasize that LIB&LINK is only a maintenance tool and 
  93.        will not create libraries or perform any linking functions 
  94.        without access to Microsoft's LIB.EXE and LINK.EXE. If you have 
  95.        those files available, LIB&LINK will save you a lot of time and 
  96.        frustration.
  97.                                                      
  98.            LIB&LINK was written with Microsoft (tm) QuickBASIC 
  99.        programmers in mind, however it is possible that it may be of 
  100.        some value to other highlevel language programmers and perhaps 
  101.        those that believe in the nitty-gritty, the MASM group. 
  102.        Programmers using other than QuickBASIC might find the lack of 
  103.        access to the linker switches a problem. If not, it may also be 
  104.        of value to you. If it is discovered that some changes will 
  105.        increase this programs useability, I would appreciate being made 
  106.        aware of the desired changes.
  107.  
  108.  
  109.                                                      
  110.                                    -CREDITS-
  111.                                                         
  112.            The window routines in this program were written by Dave 
  113.        Evers and may be found in his package BASWIND. If you program in 
  114.        QuickBASIC and have need for a number of various handy routines, 
  115.        I suggest you take a look at Dave's work. As someone said, there 
  116.        is no need reinventing the wheel. Dave's routines are available 
  117.        on many local bulletin boards as well as most of the major on-
  118.        line services.
  119.                                                         
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                       -1-
  130.                                          
  131.                                                         
  132.                                                         
  133.                                                         
  134.                                                         
  135.  
  136.                                                         
  137.                                   SETTING UP
  138.                                                         
  139.                                                         
  140.            HARD DISK Users-  It is easiest to place all needed files in 
  141.        the same directory and generate your libraries and execute the 
  142.        linking operations in the same directory.   
  143.  
  144.            The required files are;
  145.  
  146.               LIB&LINK.EXE
  147.               LIB.EXE
  148.               LINK.EXE
  149.               BCOMxx.LIB
  150.               SOURCE.OBJ files that are to be included in the library.
  151.               Any USERLIB's that have already been created.
  152.               The [.OBJ] file created from the QuickBASIC source code.                                            
  153.         
  154.            FLOPPY DISK users-  Three diskettes are required to contain 
  155.        the necessary files. Two of the diskettes, the two that are 
  156.        designated to be used in drive A: will also need to be formatted 
  157.        with the /S option because the system files are also required. 
  158.        The files on a given disk will be determined by the desired 
  159.        action, LIBing or LINKing.
  160.                                                         
  161.               Case 1- Library creation and/or maintenance;
  162.                     
  163.                  Drive A                    Drive B
  164.               COMMAND.COM                 BCOMxx.LIB
  165.               LIB&LINK.EXE                USERLIB's
  166.               LIB.EXE
  167.               SOURCE.OBJ files to be included in library.
  168.                                                          
  169.               NOTE- The USERLIB's are written to Drive B
  170.                                                          
  171.               Case 2- Linking;
  172.                                                          
  173.                  Drive A                    Drive B
  174.               COMMAND.COM              The same diskette
  175.               LIB&LINK.EXE                 used above
  176.               LINK.EXE
  177.               SOURCE.OBJ (for the [.EXE] file)
  178.                                                         
  179.               NOTE- The [.EXE] file is written to Drive A
  180.                                                         
  181.            The diskette file assignments were selected to provide the 
  182.        best use of diskette space. When the file operations are 
  183.        completed, you may copy them to a more appropriate diskette and 
  184.        erase them from your LIB and LINK diskettes regaining the space 
  185.        for future use.
  186.                                        
  187.                                                         
  188.                                                         
  189.                                                         
  190.                                                         
  191.                                                         
  192.                                                         
  193.                                                         
  194.                                               
  195.                                       -2-
  196.  
  197.                                                         
  198.                                                         
  199.                                                         
  200.                                                         
  201.                                                         
  202.                                                         
  203.                              FEATURE DESCRIPTIONS
  204.                           USING THE LIBRARIAN MODULE
  205.                                                     
  206.            When LIB&LINK is invoked, a menu will be presented that 
  207.        provides the following options;
  208.                                                         
  209.                            Select [.LIB] drive
  210.                            Create or Select [.LIB]
  211.                            Replace [.OBJ] file(s)
  212.                            List files in [.LIB]
  213.                            Add [.OBJ] files
  214.                            Delete [.OBJ] files
  215.                            Create [.EXE] file
  216.                            End LIB&LINK
  217.         
  218.            When the first menu selection is completed, the current 
  219.        drive/directory is checked for the presence of LIB.EXE, if it 
  220.        cannot be found a message will so indicate. The program returns 
  221.        to the menu allowing an orderly exit to put the missing file in 
  222.        it's proper place.
  223.                                          
  224.        SELECT [.LIB] DRIVE-
  225.                            
  226.            This selection expects a single keystroke entry defining the 
  227.        drive in which the library files may be found. <ENTER> indicates 
  228.        the current directory/drive. The floppy disk folks would normally 
  229.        enter B, because the diskette with the [.LIB] files is not 
  230.        supposed to be in drive A:. In the event an "A" is entered as the 
  231.        [.LIB] drive, the program will point out your error.
  232.                                                         
  233.        <C>REATE OR <S>ELECT [.LIB]-
  234.                       
  235.            If <S>elect is the choice, a pop-up window will display all 
  236.        library files found in the designated directory/drive. Simply tag 
  237.        the library of interest and press <ENTER>. You are not allowed to 
  238.        tag  "BCOM" or "BRUN" libraries or to tag more than one library. 
  239.        If no files are tagged, a message will be displayed and back to 
  240.        the menu we go. File operations will not be allowed until a 
  241.        library is <S>elected or <C>reated.
  242.                                     
  243.        REPLACE [.OBJ] FILE(S)-
  244.                                     
  245.            Assuming you have already created a library and have since 
  246.        modified one or more of the [.OBJ] files contained within the 
  247.        library, this choice will allow the library to be updated. Again, 
  248.        a pop-up window will display all [.OBJ] files in the current 
  249.        directory/drive. Tag the files to be replaced and press <ENTER>. 
  250.        Only the files tagged will be replaced in the chosen library. No 
  251.        files selected will display a message and return to the menu 
  252.        aborting this operation.
  253.         
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                             
  261.                                      -3-
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.        LIST FILES IN [.LIB]-
  270.                                                         
  271.            The list of files contained in the file <libraryname>.FIL, 
  272.        which was written when the library was created, will be printed 
  273.        on the screen along with a total of the number of files in the 
  274.        library. The file <libraryname>.FIL must always be available with 
  275.        <libraryname>.LIB. When libraries are copied to another diskette, 
  276.        make sure the related [.FIL]'s are copied with them.
  277.                                                         
  278.        ADD [.OBJ] FILE(S)-
  279.                                                         
  280.            You will be here when creating a library or when you have 
  281.        obtained new [.OBJ] files that you wish to include in a 
  282.        previously created library. The window will return displaying the 
  283.        available [.OBJ] files and again you simply tag the files to be 
  284.        added. If a tagged file is found to be in the library, you will 
  285.        be so advised and the duplicate file will be ignored. The  
  286.        remaining tagged files will be included in the library.
  287.  
  288.            If you would like a [.MAP] file written, answer "Y" at the 
  289.        next prompt, otherwise "N". If your choose "Y", you will need to 
  290.        enter a [.MAP] filename or press <ENTER> for the same name as the 
  291.        library. Filename entries are limited to eight (8) characters and 
  292.        do not require and will not accept an extension.
  293.            A data file is now written and passed to LIB.EXE for final 
  294.        processing.
  295.  
  296.                              
  297.        DELETE [.OBJ] FILES-
  298.                              
  299.           Yep, this one takes them out of a previously created library. 
  300.        Just Tag the [.OBJ] files you would like removed. If all [.OBJ] 
  301.        files are deleted from the library, the library and all related 
  302.        files are erased from the disk and the program resumes at the 
  303.        menu.
  304.  
  305.        END LIB&LINK-
  306.  
  307.            End of business. Exits to DOS......
  308.                                               
  309.  
  310.  
  311.                                               
  312.        WARNING !!!!!!!
  313.           If for some reason LIB.EXE should crash before successful 
  314.        completion of it's designated task, the file <filename>.FIL will 
  315.        NOT be accurate and therefore it's contents should be ignored. 
  316.        Determine the cause of the crash and restart the process.
  317.           I have taken many precautions to prevent such a happening but 
  318.        you know MURPHY and his laws! If it can happen, it probably will.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                       -4-
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                              FEATURE DESCRIPTIONS
  336.                         USING THE CREATE [.EXE] MODULE
  337.  
  338.  
  339.            It is this module that uses LINK.EXE to create executable 
  340.        files from the source [.OBJ] file and the [.OBJ] files contained 
  341.        in your library. The required data entries are relatively few. 
  342.        This routine isn't the time saver that the library module is, 
  343.        it's just very convenient.
  344.  
  345.            As with the other LIB&LINK options, you may go directly to 
  346.        "Create [.EXE] file". If the [.LIB] drive has not yet been 
  347.        defined, you will be asked to do so. 
  348.  
  349.            The next information needed is the "name of the <source>.OBJ" 
  350.        file. Here we are talking about the file that you compiled from 
  351.        the source code for the purpose of linking to an [.EXE] file and 
  352.        not any of the [.OBJ] files residing in the library. Again, no 
  353.        filename extension is required and will not be accepted.
  354.  
  355.            "Would you like to add additional [.OBJ] files?" is the next  
  356.        question. This option is included if you want to use smallerr.obj 
  357.        for example. The normal response will "N". If you answer "Y", 
  358.        just tag the appropriate files and press <ENTER>.
  359.  
  360.            "Enter run time [.EXE] file name". <ENTER> to use source
  361.         filename or type in the name of your choosing.
  362.  
  363.            "Change disks before writing the [.EXE] file?". The run time 
  364.        file will be written to the current directory/drive. In the case 
  365.        of the floppy users this will be drive A. The change disk option 
  366.        allows the disk in drive A to be changed before the file is 
  367.        written in case the original disk in drive A is short of space.
  368.  
  369.            "Would you like to write a [.MAP] file?". If you choose "Y", 
  370.        press <ENTER> to use the source filename or enter the name of 
  371.        your choice.
  372.  
  373.            Now it's a simple matter of tagging the run time library you 
  374.        wish to use and as with the library module, a data file wll be 
  375.        written and passed this time to LINK.EXE for processing.
  376.                                 
  377.            I have found LIB&LINK to be worth the time and effort 
  378.        required to write it. My hope is that others of you will feel the 
  379.        same.
  380.                                 
  381.            For those of you wishing to contribute $5.00 for it's use, I 
  382.        would like you to know that it will be accepted with sincere 
  383.        appreciation.
  384.         
  385.                                         Gary LaRonge
  386.                                         11436 Littlerock Rd.
  387.                                         Olympia, Washington
  388.                                                      98502
  389.        
  390.  
  391.  
  392.  
  393.                                     -5-
  394.                              
  395.                              
  396.                              
  397.                              
  398.                              
  399.                              
  400.                              
  401.                              
  402.                              
  403.                              
  404.                               REGISTRATION
  405.      
  406.     Gary LaRonge
  407.     11436 Littlerock Rd. S.W.
  408.     Olympia, Washington  98502
  409.      
  410.      
  411.     Program:   LIB&LINK.EXE  ($5.00)
  412.      
  413.     Received from: (Name of BBS or?)________________________________
  414.      
  415.  
  416.     Date: ______________
  417.                         
  418.     Name: _______________________________________________
  419.                                                         
  420.     Address: ____________________________________________
  421.                                             
  422.     City, St., Zip: _____________________________________
  423.                     
  424.                     
  425.     Comments and/or suggestions: ___________________________________
  426.                               
  427.     ________________________________________________________________
  428.                               
  429.     ________________________________________________________________
  430.                              
  431.     ________________________________________________________________
  432.                              
  433.     ________________________________________________________________
  434.                              
  435.     ________________________________________________________________
  436.                              
  437.     ________________________________________________________________
  438.                              
  439.     ________________________________________________________________
  440.                              
  441.     ________________________________________________________________
  442.                              
  443.     ________________________________________________________________
  444.                              
  445.     ________________________________________________________________
  446.                              
  447.     ________________________________________________________________
  448.                              
  449.     ________________________________________________________________
  450.  
  451.     ________________________________________________________________
  452.  
  453.