SPRU513Y August 2001 – June 2022 SM320F28335-EP
Usually, when you want to specify a file as linker input, you simply enter the filename; the linker looks for the file in the current directory. For example, suppose the current directory contains the library object.lib. If this library defines symbols that are referenced in the file file1.c.obj, this is how you link the files:
cl2000 --run_linker file1.c.obj object.lib
To use a file that is not in the current directory, use the --library linker option. The --library option's short form is -l. The syntax for this option is:
--library=[pathname] filename
The filename is the name of an archive, object file, or linker command file. You can specify up to 128 search paths.
The --library option is not required when one or more members of an object library are specified for input to an output section. For more information about allocating archive members, see Section 9.6.5.5.
You can adjust the linker's directory search algorithm using the --search_path linker option or the C2000_C_DIR environment variable. The linker searches for object libraries and command files in this order: