cl /out => 选项 'o' 已被弃用 => 零字节 ut 文件

cl /out => option 'o' has been deprecated => zero-byte ut file

cl t2.c /out:full.exe
Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28611 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
t2.c
Microsoft (R) Incremental Linker Version 14.25.28611.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:t2.exe
/out:ut:full.exe
t2.obj

文件 ut 是一个零字节文件。

这是怎么回事? ut 名字从何而来?为什么是ut:full.exe,但实际上是ut(零字节文件)?

汉斯·帕桑特:

Option /o is old and no longer documented. Use /link to pass options to the linker.

解法:cl t2.c /link /out:full.exe.