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).
These libraries appear as follows in the linker map file.
INPUT MODULES INCLUDED:
C:\KEIL\C166\LIB\C166S.LIB (?C_STARTUP)
COMMENT TYPE 128: A166 V5.00
C:\KEIL\C166\LIB\C166S.LIB (PRINTF)
COMMENT TYPE 128: A166 V5.00
If NODEFAULTLIBRARY is used, C run-time libraries must be
manually included in the linkage. For example:
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 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.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.