/NODEFAULTLIB (Ignore Libraries)
Home | Overview | How Do I | Linker Options
Syntax
/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.
To find this option in the development environment, click Settings on the Project menu. Then click the Link tab, and click Input in the Category box.
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, type a comma (,) between the library names.
The Ignore Libraries (/NODEFAULTLIB:library) option overrides /DEFAULTLIB:library when the same library name is specified in both.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
C Run-Time Library (without iostream) | Characteristics | Option | Defined |
LIBC.LIB | Single threaded, static link | /ML | |
LIBCMT.LIB | Multithreaded, static link | /MT | _MT |
MSVCRT.LIB | Multithreaded, dynamic link (import library for MSVCRT.DLL) | /MD | _MT, _DLL |
Standard C++ Library | Characteristics | Option | Defined |
LIBCP.LIB | Single threaded, static link | /ML | |
LIBCPMT.LIB | Multithreaded, static link | /MT | _MT |
MSVCPRT.LIB | Multithreaded, dynamic link (import library for MSVCRT.DLL) | /MD | _MT, _DLL |
编译的时候常会出现c或C++符号冲突的情况,可以在vc6->Project Setting->link->input里面把对应不需要的lib填充到Ignore Libraries列表里面