,一个lib文件是obj文件的集合。当然,其中还夹杂着其他一些辅助信息,目的是为了让编译器能够准确找到对应的obj文件。
查看:C:/tlib>tlib
TLIB Version 2.0 Copyright (c) 1987, 1988 Borland International
Syntax: TLIB libname [/C] [/E] commands, listfile
libname library file pathname
commands sequence of operations to be performed (optional)
listfile file name for listing file (optional)
A command is of the form: <symbol>modulename, where <symbol> is:
+ add modulename to the library
- remove modulename from the library
* extract modulename without removing it
-+ or +- replace modulename in library
-* or *- extract modulename and remove it
/C case-sensitive library
/E create extended dictionary
Use @filepath to continue from file "filepath".
Use '&' at end of a line to continue onto the next line.
验证:
C:/tlib>tlib c:/tlib/cs.lib +,c0s.obj
TLIB Version 2.0 Copyright (c) 1987, 1988 Borland International
把c0s.obj删除,再执行下面语句
C:/tlib>tlib c:/tlib/cs.lib -,c0s.obj
TLIB Version 2.0 Copyright (c) 1987, 1988 Borland International
执行后发现在tlib的目录下多了c0s.obj
如何知道lib文件中包含的obj文件呢?