Author Topic: Extended version of the library tool for PB, BLIB.EXE  (Read 2023 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4812
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Extended version of the library tool for PB, BLIB.EXE
« on: January 14, 2015, 05:35:15 PM »
Seemed that the prototype version EXPLODE ended up working OK so I have added the extra capacity to LIST, EXPLODE and COMBINE static link libraries into one tool. This gives
the PowerBASIC programmer a modern tool that most other powerful languages have, a general purpose library manager. The tool is both fast and easy to use and its help data is displayed on the command line by typing the name with no arguments.

This is what you get from the command line.

Library tool for PowerBASIC

NOTATION:
    1. blib /c libname.ext
       COMBINE all SLL files in the current directory into a library.

    2. blib /e libname.ext
       EXPLODE all SLL modules in a library to separate files.

    3. blib /l libname.ext
       LIST all SLL module file names in a library.

This is basically a tool for people like vendors who have to deal with reasonably large numbers of modules. Just for example the Microsoft LIBC.LIB last I knew had over 600 modules in it and while it may not be worth the effort to make them that large, I have no doubt that many PB programmers have large collections of functions that are well suited to placing them in a library.

Now in terms of security, an issue that a few have raised, the compilers produce a binary file with the extension SLL and that file is not editable, all you are doing with a library manager, either the 2 PB versions or this one is bundling and unbundling existing binary files produced by the compiler. I know of no tool that will allow editing of a PB SLL file and I doubt that one will ever be available so the vendor has no problems in protecting their code in SLL and LIB form.

The COMBINE operation attempts to address a problem of having 2 or more modules containing the same COMMON function by performing duplicate checking and it will identify the first file that has the function and the next file that has the duplicate. It rejects the duplicate and the output allows you to choose which one you remove from the library.

I will post a test library of basic code shortly to test the tool and any feedback from anyone interested will be appreciated as it helps to make the tool more reliable.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4812
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Extended version of the library tool for PB, BLIB.EXE
« Reply #1 on: January 19, 2015, 10:23:09 AM »
The attached zip file contains and example of how to use the old style controls with a window made with CreateWindowEx().

There are 3 directories,

1. The parent that contains the example AND the finished library.
2. The first subdirectory that contains the SLL files to build the library and a batch file that runs BLIB.EXE to combine the SLL modules into the library.
3. The next subdirectory that contains the source for the controls. As the SLLs are already compiled this source is not necessary to build the library.

hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: