 | LARM User's Guide Discontinued |  |
|
|
| NODEFAULTLIBRARY Linker Directive| Abbreviation | NLIB | | Arguments | None. | | Default | C run-time libraries are included in the linkage. | | µVision | Options — L166L251BL51LX51LA Misc — Misc Controls. | | Description | The NODEFAULTLIBRARY directive disables automatic linkage with the C run-time libraries. By default, the linker includes required run-time libraries (based on memory model and floating-point usage). If NODEFAULTLIBRARY is used, C run-time libraries must be manually included in the linkage. For example:
L166L251BL51LX51LA inputlist, CxxFPS.LIB, CxxS.LIB NODEFAULTLIBRARY
This example includes the SMALL memory model library (CxxS.LIB) and the SMALL floating-point library (CxxFPS.LIB). If the program contains no floating-point math operations CxxFPS.LIB should not be included in the linkage. Note - The C166LIB environment variable specifies the location of library files. Typically, this is set to \KEIL\C166\LIB but you may change it using the DOS SET command. The C51LIB environment variable specifies the location of library files. Typically, this is set to \KEIL\C51\LIB but you may change it using the DOS SET command. The C251LIB environment variable specifies the location of library files. Typically, this is set to \KEIL\C251\LIB but you may change it using the DOS SET command. The linker looks in this folder for the C run-time libraries. If you use the µVision IDE, the location of the run-time libraries is set automatically. You may change it in the Project — File Extensions, Books, and Environment dialog.
- If no environment variable is set, the linker searches for libraries in exepath/../LIB which corresponds to the location for library files in a default installation.
| | Example |
L166L251BL51LX51LA file1.obj NODEFAULTLIBRARY
|
|
|