Why is -o a candidate for removal from the Microsoft compiler and linker?

I came across the following, and I wonder what impact this will have on my Cygwin / GNU environment. Should I use something other than -oto name compilation output?

Has any new standard been adopted and are other compilers sticking to it?

What will be the motivation for removal -o?

DOS PROMPT> type compile.bat

cl.exe -D YY_MAIN=1 lex.yy.c libfl.obj -o foobar

DOS PROMPT> compile

cl.exe -D YY_MAIN=1 lex.yy.c libfl.obj -o foobar
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.
lex.yy.c
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.
/out:lex.yy.exe
/out:foobar.exe
lex.yy.obj
libfl.obj

cl: D9035 command line warning: the 'o' option is deprecated and will be removed in a future release


From the answer below, are they trying to deliberately widen the gap between Windows and UNIX? I hope not. I hope that I am missing some new convention adopted by all compilers.

+7
3

, - , - (, - - , - Microsoft .)

, .

( ) Microsoft Unix , . Make - , , - , CMake SCons ( , , : )).

+2

. /F .

+4

Windows Unix. a/ a -, cl.exe cc Unix.

It looks like the option you are looking for is /Fe

+4
source

All Articles