File Name Extensions

Files specified on the command line are identified by contents and file extension. The command-line version of the CodeWarrior C/C++ compiler accepts non-standard file extensions as source code but also emits a warning message. By default, the compiler assumes that a file with any extensions besides .c, .h, .pch is C++ source code. The linker ignores all files that it can not identify as object code, libraries, or command files.

Linker command files must end in .lcf. They may be simply added to the link line, for example (Example of using linker command files).

Listing 1. Example of using linker command files
mwldtarget file.o lib.a commandfile.lcf

For more information on linker command files, refer to the Targeting manual for your platform.