Visual C++ Libraries Build Options

You can use the following compiler and linker options to rebuild the MFC, CRT, and ATL libraries. Starting in Visual C++ 2010, scripts for rebuilding these libraries are no longer shipped.

Naming Conventions

These are the naming conventions for libraries:

  • The retail, non-Unicode version of a library has no prefix or suffix.

  • The debug version of a library has a suffix that contains a 'D'.

  • The Unicode version of a library has a suffix or a prefix that contains a 'U'.

  • In one case (AFXCW), the prefix for the non-Unicode version of the library is 'N'.

  • The name of a dynamic link library contains its release number.

Options

For more information about compiler options, see Compiler Options. For more information about linker options, see Linker Options. For more information about library manager options, see Running LIB, Managing a Library, and Extracting a Library Member.

ATL Library

ATLS Common Options

The following table lists common options for the retail and debug versions of the ATL static library.

Binary File

Compiler Options

Linker and Library Manager Options

ATLS.LIB

ATLSD.LIB

/Oy-

/Gd

/GR-

/Gm-

/GL-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope

/Zi

/Zl

/Zp8

/FC

/hotpatch

/SUBSYSTEM:"console,5.00"

/MACHINE:x86

ATLS Additional Options

The following table lists additional options for the retail and debug versions of the ATL static library.

Binary File

Compiler Options

Linker and Library Manager Options

ATLS.LIB

/O1

/Os

/MT

 

ATLSD.LIB

/Od

/Oi-

/MTd

 

ATL100 Common Options

The following table lists common options for release 10.0 of the ATL dynamic link library.

Binary File

Compiler Options

Linker and Library Manager Options

ATL100.DLL

/O1

/Os

/Oy-

/Gd

/GR-

/Gm-

/GL-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope

/Zi

/Zl

/Zp8

/MT

/FC

/hotpatch

/SUBSYSTEM:"windows,5.00"

/MACHINE:x86

/DLL

/INCREMENTAL:NO

/DEBUGTYPE:cv,fixup

/OSVERSION:5.00

/VERSION:9.0

/PDBCOMPRESS

/LARGEADDRESSAWARE

/MANIFEST:NO

/MERGE:.rdata=.text

/RELEASE

/SAFESEH

/ASSEMBLYDEBUG

/DEBUG

/STACK:0x100000,0x1000

/opt:icf,32

/DYNAMICBASE

/FUNCTIONPADMIN

/NXCOMPAT

MFC Library

AFXCW Common Options

The following table lists common options for all versions of the MFC static library.

Binary File

Compiler Options

Linker and Library Manager Options

NAFXCW.LIB

UAFXCW.LIB

NAFXCWD.LIB

UAFXCWD.LIB

/Oy-

/Gd

/GR

/EHs

/EHc

/Gm-

/GL-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope

/Zi

/Zl

/Zp8

/FC

/hotpatch

/SUBSYSTEM:"console,5.00"

/MACHINE:x86

AFXCW Additional Options

The following table lists additional options for all versions of the MFC static library.

Binary File

Compiler Options

Linker and Library Manager Options

NAFXCW.LIB

/O1

/Os

/MT

 

NAFXCWD.LIB

/Od

/Oi-

/MTd

 

UAFXCW.LIB

/O1

/Os

/MT

 

UAFXCWD.LIB

/Od

/Oi-

/MTd

 

MFC100 Common Options

The following table lists common options for all versions of release 10.0 of the MFC dynamic link library.

Binary File

Compiler Options

Linker and Library Manager Options

MFC100.DLL

MFC100U.DLL

MFC100D.DLL

MFC100UD.DLL

/Oy-

/Gd

/GR

/EHs

/EHc

/Gm-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope

/Zi

/Zl

/Zp8

/FC

/hotpatch

/NODEFAULTLIB

/SUBSYSTEM:"console,5.00"

/MACHINE:x86

/DLL

/INCREMENTAL:NO

/DEBUGTYPE:cv,fixup

/OSVERSION:5.00

/VERSION:9.0

/PDBCOMPRESS

/LARGEADDRESSAWARE

/OPT:REF

/MANIFEST:NO

/MERGE:.rdata=.text

/RELEASE

/SAFESEH

/DEBUG

/STACK:0x100000,0x1000

/opt:icf,32

/DYNAMICBASE

/FUNCTIONPADMIN

/NXCOMPAT

MFC100 Additional Options

The following table lists additional options for all versions of release 10.0 of the MFC dynamic link library.

Binary File

Compiler Options

Linker and Library Manager Options

MFC100.DLL

MFC100U.DLL

/O1

/Os

/GL

/MD

/profile

/LTCG

MFC100D.DLL

MFC100UD.DLL

/Od

/Oi-

/GL-

/MDd

/ASSEMBLYDEBUG

CRT Library

MSVCR100 Common Options

The following table lists common options for all versions of release 10.0 of the native C run-time library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCR100.DLL

MSVCR100D.DLL

/Oi-

/Oy-

/Gd

/GR

/EHs

/EHc

/Gm-

/GL-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope-

/Z7

/Zl

/Zp8

/FC

/Zlp8

/GFy

/hotpatch

/NODEFAULTLIB

/SUBSYSTEM:"windows,5.00"

/MACHINE:x86

/DLL

/INCREMENTAL:NO

/DEBUGTYPE:cv,fixup

/OSVERSION:5.00

/VERSION:9.0

/PDBCOMPRESS

/LARGEADDRESSAWARE

/OPT:REF

/OPT:ICF

/ENTRY:"_CRTDLL_INIT@12"

/MANIFEST:NO

/MERGE:.rdata=.text

/RELEASE

/SAFESEH

/DEBUG

/STACK:0x100000,0x1000

/entry:_CRTDLL_INIT

/opt:ref,icf=3

/debugtype:cv,fixup

/DYNAMICBASE

/FUNCTIONPADMIN

/NXCOMPAT

MSVCR100 Additional Options

The following table lists additional options for all versions of release 10.0 of the native C run-time library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCR100.DLL

/O1

/Os

/ltcg:nostatus

/profile

MSVCR100D.DLL

/Od

/ASSEMBLYDEBUG

MSVCP100 Common Options

The following table lists common options for all versions of release 10.0 of the standard C++ library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCP100.DLL

MSVCP100D.DLL

/Oi-

/Oy-

/Gd

/GR

/EHs

/EHc

/Gm-

/GL-

/GF

/Gy

/GS

/Zc:wchar_t

/Zc:forScope-

/Z7

/Zl

/Zp8

/FC

/WX

/Zlp8

/GFy

/hotpatch

/NODEFAULTLIB

/SUBSYSTEM:"windows,5.00"

/MACHINE:x86

/DLL

/INCREMENTAL:NO

/DEBUGTYPE:cv,fixup

/OSVERSION:5.00

/VERSION:9.0

/PDBCOMPRESS

/LARGEADDRESSAWARE

/MANIFEST:NO

/MERGE:.rdata=.text

/RELEASE

/SAFESEH

/DEBUG

/STACK:0x100000,0x1000

/opt:ref,icf=3

/debugtype:cv,fixup

/DYNAMICBASE

/FUNCTIONPADMIN

/NXCOMPAT

MSVCP100 Additional Options

The following table lists additional options for all versions of release 10.0 of the standard C++ library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCP100.DLL

/O1

/Os

/ltcg:nostatus

/profile

MSVCP100D.DLL

/Od

/ASSEMBLYDEBUG

MSVCM100 Common Options

The following table lists common options for all versions of release 10.0 of the managed CRT library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCM100.DLL

MSVCM100D.DLL

/Oi-

/Oy-

/Gd

/GR

/EHa

/EHc

/Gm-

/GL-

/GF

/Gy

/GS

/clr

/Zc:wchar_t

/Zc:forScope-

/Z7

/Zl

/Zp8

/FC

/Zlp8

/GFy

/hotpatch

/NODEFAULTLIB

/SUBSYSTEM:"windows,5.00"

/MACHINE:x86

/DLL

/INCREMENTAL:NO

/DEBUGTYPE:cv,fixup

/OSVERSION:5.00

/VERSION:9.0

/PDBCOMPRESS

/LARGEADDRESSAWARE

/MANIFEST:NO

/MERGE:.rdata=.text

/RELEASE

/SAFESEH

/DEBUG

/STACK:0x100000,0x1000

/opt:ref,icf=3

/DYNAMICBASE

/FUNCTIONPADMIN

/NXCOMPAT

MSVCM100 Additional Options

The following table lists additional options for all versions of release 10.0 of the managed CRT library.

Binary File

Compiler Options

Linker and Library Manager Options

MSVCM100.DLL

/O1

/profile

MSVCM100D.DLL

/Od

/ASSEMBLYDEBUG

See Also

Reference

Compiler Options

Linker Options

LIB Reference

Other Resources

Visual C++ Libraries Reference