/NODEFAULTLIB[:library]
This option tells the linker to remove one or more default libraries from the list of libraries it searches when resolving external references.
Command line | Project settings | Description |
---|---|---|
/NODEFAULTLIB:library | Ignore Libraries | This option removes the specified library or libraries from the list of libraries it searches when resolving external references. |
/NODEFAULTLIB | Ignore All Default Libraries | This option removes all default libraries from the list of libraries it searches when resolving external references. |
The linker resolves references to external definitions by searching first in libraries specified in the Object/Library Modules text box in the Project Settings dialog box (or on the command line), then in default libraries specified with the /DEFAULTLIB option, and then in default libraries named in .obj files.
To specify multiple libraries, use /NODEFAULTLIB:library more than once.
The Ignore Libraries (/NODEFAULTLIB:library) option overrides /DEFAULTLIB:library when the same library name is specified in both.
If you use /NODEFAULTLIB linker option, for example to build your program without the C run-time library, you may have to also use /ENTRY to specify the entry point (function) in your program.
Setting Linker Options | Linker Options | FAQ: Building Your Program