Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

/DEFAULTLIB (Specify Default Library)

/DEFAULTLIB:library

where:

library

The name of a library to search when resolving external references.

The /DEFAULTLIB option adds one library to the list of libraries that LINK searches when resolving references. A library specified with /DEFAULTLIB is searched after libraries specified on the command line and before default libraries named in .obj files.

The Ignore All Default Libraries (/NODEFAULTLIB) option overrides /DEFAULTLIB:library. The Ignore Libraries (/NODEFAULTLIB:library) option overrides /DEFAULTLIB:library when the same library name is specified in both.

To set this linker option in the Visual Studio development environment

  • This linker option is not available from the Visual Studio development environment. To add a library to the link phase, use the Additional Dependencies property from the Input property page.

To set this linker option programmatically

Community Additions

ADD
Show:
© 2015 Microsoft