![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX
Lib objectFile1 [objectFile2]… [-d] [-df deleteFile] DESCRIPTION The Lib tool combines several object files into a larger object file called a library. This library can then be put into the makefile of a program, significantly reducing link time. In effect, you are precompiling sections of your code--optimally ones that do not change much--and combining them into a large file that can be used by any number of programs. Building a library allows you to • use the library in several programs without having to recompile the code each time • combine object code written in different languages into a single file • combine several libraries into a single library (for a particular application or desk accessory, for instance), which also improves linker performance • customize a library by deleting unneeded modules (-dm), changing segmentation (-sg and -sn), and changing variables from global to local (-dn and -dnx) Note that the linker's output is the same size whether or not a library is used in the makefile. Although multiple symbols are reduced to a single symbol, modules are not combined into larger modules and cross-module references are not resolved. Lib can be used to create a CFM-68K static runtime library. There is no -model cfmseg option supported by Lib since it determines the output library type from the type of input files. INPUT One or more object files. The Lib tool does not read standard input. All object files must have been compiled for the same runtime model. You cannot mix object files compiled for classic 68K with files compiled for CFM-68K on the command line. OUTPUT Output is placed in the data fork of the library file, Lib.Out.o. You can use the -o option to rename this file. Normally the library is given a file of type 'OBJ ' and a creator of 'MPS '.
Note STATUS
Lib can return the following status codes:
PARAMETERS objectFile1 [objectFile2]… Specifies one or more object files of type 'OBJ '. OPTIONS -d Suppresses warnings for duplicate symbol definitions for both data and code. -df deleteFile Deletes the list of external modules found in deleteFile. -dm name[,name]… Deletes the specified entry points or external modules from the output file. This option allows you to make the library file smaller, reducing subsequent link time. When you delete an entry point, Lib deletes only that entry point, not the module or any other entry point in that module. If you delete a module, all of its associated entry points are also deleted.
Note -dn name[,name]… Deletes one or more entry-point or module names from the output file by reducing their scope to local. This is a gentle deletion in that the contents of the entry points and modules remain present in the output file. References to names deleted in this way continue to refer to the same code, but with a local scope. This option is particularly useful when a global name conflict occurs between two pieces of code, one of which is library code from which you do not need to call the name directly. -dnx name[,name]… Lets you specify a list of entry-point or module names you want to keep and deletes the rest of the names from the output file by reducing their scope to local. This is a gentle deletion in that the contents of the entry points and modules remain present in the output file. References to names deleted in this way point to the same code but with a local scope. -f Treats duplicate data definitions as Fortran "common" regions (multiple data modules with the same name). The size of the largest module is used. There can be at most one initialization of the data. -mf Enables the use of Process Manager temporary memory. Note that the Lib command's use of Process Manager temporary memory excludes other applications from using it, including the Finder.
WARNING -o name.o Renames the output file to name.o. The default name is Lib.Out.o. -p Writes progress and summary information to diagnostic output. -rn oldName=newName[,oldName1=newName2]… Changes module name from oldName to newName.
Note -sg newSeg=[oldSeg1[,oldSeg2]…]… Changes segmentation so that code in the old segments (oldSeg1, oldSeg2,…) is placed in the segment newSeg. If you do not specify the old segments, the Lib tool places all code in newSeg. -sn oldSeg=newSeg Changes a segment name so that the code in the old segment is placed in the segment named newSeg. -sym [on | full[,nolines][,nolabels][,novars][,notypes]] | off Determines whether to keep or discard the symbolic debugging information. Note that the parameters on and full are equivalent. on | full Keeps the complete object file records with symbolic debugger information (the default). You can limit-sym on by also specifying one or more of the following parameters: ,nolines Discards line information. ,nolabels Discards label information. ,novars Discards variable information. ,notypes Discards type information. off Does not generate object file records containing symbolic information. -w Suppresses warning messages. -ver number Sets the version of the OMF file to number. EXAMPLES The following command line combines all the libraries (≈) in the {CLibraries} directory into a single library named CLibrary.o. Lib "{CLibraries}"≈ -o "{CLibraries}"CLibrary.o For applications that require most or all of the C library files, using the combined C library file reduces link time. LIMITATIONS When Lib is processing library files, the maximum number of objects (symbols, modules, labels) that it can store is 16 MB. Each object file may contribute up to 64 KB toward this maximum. The limit on the number of symbols in an output file is set at 64 KB. SEE ALSO
|