SPRU513Z August 2001 – October 2023 SM320F28335-EP
Consider these object file libraries that all have the same members, but are built with different build options:
Object File Library Name | Build Options |
---|---|
mylib_2800_ml.lib | (default) |
mylib_2800_fpu32.lib | --float_support=fpu32 |
Using the library information archiver, you can create an index library called mylib.lib from the above libraries:
libinfo2000 --output mylib.lib mylib_2800.lib mylib_2800_fpu32.lib mylib_2800_ml.lib
You can now specify mylib.lib as a library for the linker of an application. The linker uses the index library to choose the appropriate version of the library to use. If the --issue_remarks option is specified before the --run_linker option, the linker reports which library was chosen.
cl2000 --issue_remarks main.c -z -l lnk.cmd ./mylib.lib
<Linking>
remark: linking in "mylib_2800.lib" in place of "mylib.lib"
cl2000 --float_support=fpu32 --issue_remarks main.c -z -l lnk.cmd ./mylib.lib
<Linking>
remark: linking in "mylib_2800_fpu32.lib" in place of "mylib.lib"