GUI ScreenIO for Windows |
Now that you've decided it makes sense to use object libraries, how do you go about creating and maintaining your own? Easy; you use Microsoft LIB.
Microsoft LIB is a program that is distributed with your compiler. Unfortunately, however, compiler vendors rarely provide much, if any, documentation on actually using LIB. Fortunately, LIB is easy to use.
You can get a list of instructions by giving the command "LIB /h" at your command prompt. That yields this somewhat terse output, but it's all we really need:
Microsoft (R) Library Manager Version 5.12.8181
|
You must create the library before you can use it. You can't create an empty library, so you need to add a module to it when you create it.
In this example, we'll create the object library my.lib and store the object module a.obj in it.
LIB /out:my.lib a.obj |
Simple, no?
Now that we've created the library, it's trivial to update it. Let's add our object module b.obj to my.lib:
LIB my.lib b.obj |
If b.obj was already present in my.lib, this will replace the original b.obj with the new one.
The rest of the commands are about as simple, but they're rarely used.
© 2000-2019 Norcom, all rights reserved |