| Syntax: | Default: |
| /DEF[AULTLIBRARYSEARCH] [:library] | /DEFAULTLIBRARYSEARCH |
| /NOD[EFAULTLIBRARYSEARCH][:library] |
Use /DEFAULTLIBRARYSEARCH to have the linker search the default libraries of object files when resolving references.
If you specify a library with the option, the linker adds the library name to the list of default libraries. The default libraries for an object file are defined at compile time, and embedded in the object file. The linker searches the default libraries by default.
Use /NODEFAULTLIBRARYSEARCH to tell the linker to ignore default libraries when it resolves external references. If you specify a library with the option, the linker ignores that default library, but searches the rest of the default libraries (and any others that are defined in the object files).
If you specify /NODEFAULTLIBRARYSEARCH without specifying library, then you must explicitly specify all the libraries you want to use, including IBM C and C++ Compilers runtime libraries.
If you are compiling and linking in one step, specifying /Gn automatically passes /NODEFAULTLIBRARYSEARCH to the linker.
![]()
Summary of Linker Options
Link with Library Files