SPRUIG8J January 2018 – March 2024
An environment variable is a system symbol that you define and assign a string to. The linker uses an environment variable named C7X_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) | C7X_C_DIR ="pathname1; pathname2; . . . "; export C7X_C_DIR |
Windows | set C7X_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 C7X_C_DIR= c:\path\one\to\tools ; c:\path\two\to\tools
set C7X_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 C7X_A_DIR to name alternate directories that contain copy/include files. If C7X_C_DIR is not set, the linker searches for object libraries in the directories named with C7X_A_DIR. For more information about object libraries, see Section 12.6.7.