Link Options

The CRT lib directory includes a number of small object files that enable specific CRT features without any code change. These are called "link options" since you just have to add them to the linker command line to use them.

CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and /clr code.

Native and /clr Pure mode Description
binmode.obj pbinmode.obj Sets the default file-translation mode to binary. See _fmode.
chkstk.obj n/a Provides stack-checking and alloca support when not using the CRT.
commode.obj pcommode.obj Sets the global commit flag to "commit". See fopen, _wfopen and fopen_s, _wfopen_s.
exe_initialize_mta.lib n/a Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, do not use it for DLLs. Linking to this is equivalent to including combase.h and defining _EXE_INITIALIZE_MTA.
fp10.obj n/a Changes the default precision control to 64 bits. See Floating-Point Support.
invalidcontinue.obj pinvalidcontinue.obj Sets a default invalid parameter handler that does nothing, meaning that invalid parameters passed to CRT functions will just set errno and return an error result.
loosefpmath.obj n/a Ensures that floating point code tolerates denormal values.
newmode.obj pnewmode.obj Causes malloc to call the new handler on failure. See _set_new_mode, _set_new_handler, calloc, and realloc.
noarg.obj pnoarg.obj Disables all processing of argc and argv.
nochkclr.obj n/a Does nothing. Remove from your project.
noenv.obj pnoenv.obj Disables the creation of a cached environment for the CRT.
nothrownew.obj pnothrownew.obj Enables the non-throwing version of new in the CRT. See new and delete Operators.
setargv.obj psetargv.obj Enables command-line argument wildcard expansion. See Expanding Wildcard Arguments.
threadlocale.obj pthreadlocale.obj Enables per-thread locale for all new threads by default.
wsetargv.obj pwsetargv.obj Enables command-line argument wildcard expansion. See Expanding Wildcard Arguments.

See also