Contents -------- 0. Introduction 1. Synopsis 2. How it works 3. Compiler 4. Wrap up 5. File list 0. Introduction --------------- This material has been placed in the public domain and as such there are no limitations on its use. I do ask however that an acknowledgement is made if this helps you out and the header remains intact in the source (yes I've got an ego too folks). As is usually the case, no warranties explicitly or implied is made with this stuff. 1. Synopsis ----------- Some .LIB files are not constructed as per the standard. They appear as a list of object modules without the intervening librarian records. LIB is not able to understand these which makes breaking object modules out very hard. Hence this program which takes one of these .LIB files and breaks it into separate .OBJ modules. THIS CODE WILL NOT WORK ON A STANDARD LIB FORMAT LIBRARY. Use the standard LIB to process those files. 2. How it works --------------- It searches for a THEADR record and generates a .OBJ name from this. The drive/directory names are stripped, Duplicate names being resolved by replacing the .OBJ extension with .001, .002, etc. All records are then copied until a MODEND is encountered. This process continues until the whole file has been read. Information is written to stdout about the .OBJ modules, namely the .OBJ name versus the THEADR information. A .LNK file is produced which can be used as a response file for LIB to rebuild the library. 3. Compilers ------------ Microsoft C 7.00 was used to compile this, using a command line of: CL /AL /Za /W4 /WX libtoobj.c As this is the most stringent error checking I can get, I'll assume the code is reasonably portable to another compiler. The only microsoft-dependent function that I'm aware of is '_splitpath'. I've wrapped this within 'SplitPath' in the hope that it will be easier to change to another function/compiler if required. 4. Wrap up ---------- Any suggestions, improvements, etc. are all welcome. You can contact me via email at the address below. 5. File list ------------ LIBtoOBJ.txt (this file) LIBtoOBJ.c makefile Lee Brown Compuserve: 100325,3304