链接选项Link Options

CRT lib 目录中包括大量无需更改任何代码就能启用特定的 CRT 功能的小型对象文件。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 纯模式版本在 Visual Studio 2015 中已弃用并在 Visual Studio 2017 中不受支持。CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. 将常规版本用于本机和 /clr 代码。Use the regular versions for native and /clr code.

本机和 /clrNative and /clr 纯模式Pure mode 描述Description
binmode.objbinmode.obj pbinmode.objpbinmode.obj 为二进制设置默认文件转换模式。Sets the default file-translation mode to binary. 请参阅 _fmodeSee _fmode.
chkstk.objchkstk.obj n/an/a 在未使用 CRT 时提供堆栈检查和分配支持。Provides stack-checking and alloca support when not using the CRT.
commode.objcommode.obj pcommode.objpcommode.obj 设置用于“提交”的全局提交标志。Sets the global commit flag to "commit". 请参阅 fopen、_wfopenfopen_s、_wfopen_sSee fopen, _wfopen and fopen_s, _wfopen_s.
fp10.objfp10.obj n/an/a 将默认精度控制更改为 64 位。Changes the default precision control to 64 bits. 请参阅浮点支持See Floating-Point Support.
invalidcontinue.objinvalidcontinue.obj pinvalidcontinue.objpinvalidcontinue.obj 设置不执行任何操作的默认无效参数处理程序,这意味着传递到 CRT 函数的无效参数将只会设置 errno 并返回一个错误结果。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.objloosefpmath.obj n/an/a 确保浮点代码容忍不正常的值。Ensures that floating point code tolerates denormal values.
newmode.objnewmode.obj pnewmode.objpnewmode.obj 导致 malloc 调用新处理程序失败。Causes malloc to call the new handler on failure. 请参阅 _set_new_mode_set_new_handlercalloc,和 reallocSee _set_new_mode, _set_new_handler, calloc, and realloc.
noarg.objnoarg.obj pnoarg.objpnoarg.obj 禁用所有 argc 和 argv 进程。Disables all processing of argc and argv.
nochkclr.objnochkclr.obj n/an/a 不执行任何操作。Does nothing. 从项目中删除。Remove from your project.
noenv.objnoenv.obj pnoenv.objpnoenv.obj 禁止为 CRT 创建缓存环境。Disables the creation of a cached environment for the CRT.
nothrownew.objnothrownew.obj pnothrownew.objpnothrownew.obj 启用 CRT 中新增功能的非引发版本。Enables the non-throwing version of new in the CRT. 请参阅 new 和 delete 运算符See new and delete Operators.
setargv.objsetargv.obj psetargv.objpsetargv.obj 启用命令行参数通配符扩展。Enables command-line argument wildcard expansion. 请参阅扩展通配符参数See Expanding Wildcard Arguments.
threadlocale.objthreadlocale.obj pthreadlocale.objpthreadlocale.obj 默认情况下,启用所有新线程的每线程区域设置。Enables per-thread locale for all new threads by default.
wsetargv.objwsetargv.obj pwsetargv.objpwsetargv.obj 启用命令行参数通配符扩展。Enables command-line argument wildcard expansion. 请参阅扩展通配符参数See Expanding Wildcard Arguments.

请参阅See also