/NODEFAULTLIB (Ignore Libraries)
This page is specific to:.NET Framework Version:1.12.03.03.54.0
Visual C++ Linker Options
/NODEFAULTLIB (Ignore Libraries)
/NODEFAULTLIB[:library] 

where:

library
A library that you want the linker to ignore when it resolves external references.

Remarks

The /NODEFAULTLIB option tells the linker to remove one or more default libraries from the list of libraries it searches when resolving external references.

By default, /NODEFAULTLIB removes all default libraries from the list of libraries it searches when resolving external references. The optional library parameter lets you remove a specified library or libraries from the list of libraries it searches when resolving external references. Specify one /NODEFAULTLIB option for each library you want to exclude.

The linker resolves references to external definitions by searching first in libraries that you explicitly specify, then in default libraries specified with the /DEFAULTLIB option, and then in default libraries named in .obj files.

/NODEFAULTLIB:library overrides /DEFAULTLIB:library when the same library name is specified in both.

If you use /NODEFAULTLIB, 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.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the Linker folder.
  3. Click the Input property page.
  4. Modify the Ignore All Default Libraries or Ignore Specific Library property.

To set this linker option programmatically

See IgnoreDefaultLibraryNames Property and IgnoreAllDefaultLibraries Property.

See Also

Setting Linker Options | Linker Options

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View