SPRUI03E June 2015 – January 2023
An environment variable is a system symbol that you define and assign a string to. The linker uses an environment variable named C6X_C_DIR to name alternate directories that contain object libraries. The command syntaxes for assigning the environment variable are:
Operating System | Enter |
---|---|
UNIX (Bourne shell) | C6X_C_DIR ="pathname1; pathname2; . . . "; export C6X_C_DIR |
Windows | set C6X_C_DIR = pathname1 ; pathname2 ; . . . |
The pathnames are directories that contain input files. Use the --library linker option on the command line or in a command file to tell the linker which library or linker command file to search for. The pathnames must follow these constraints:
set C6X_C_DIR= c:\path\one\to\tools ; c:\path\two\to\tools
set C6X_C_DIR=c:\first path\to\tools;d:\second path\to\tools
In the example below, assume that two archive libraries called r.lib and lib2.lib reside in ld and ld2 directories. The table below shows how to set the environment variable, and how to use both libraries during a link. Select the row for your operating system:
Operating System | Invocation Command |
---|---|
UNIX (Bourne shell) |
|
Windows |
|
The environment variable remains set until you reboot the system or reset the variable by entering:
Operating System | Enter |
---|---|
UNIX (Bourne shell) |
|
Windows |
|
The assembler uses an environment variable named C6X_A_DIR to name alternate directories that contain copy/include files or macro libraries. If C6X_C_DIR is not set, the linker searches for object libraries in the directories named with C6X_A_DIR. For information about C6X_A_DIR, see Section 5.6.2. For more information about object libraries, see Section 9.7.3.