First page Back Continue Last page Overview Graphics
Problem 2. Link failed.
Response: When the linker fails, make sure that
a. the linker command file lists all object files to be linked,
b. global variables and labels are defined and referenced in each of main.s and macro.s, and
c. you have not listed object files that you didn't intend to use into the linker command file.
If a needed object file is omitted from the link list, error messages may indicate that variables have not been defined. On the other hand, if you include extra object files in the link list, you may see error messages indicating that an attempt has been made to redefine a variable. Worse, it is possible that no errors will result from omitted object files because the variables were defined (usually not the way you intended) in the extra object file that should not have been included in the link list. This type of error can be difficult to locate.