From: andrey the giant on
A few questions about options to cl.exe:
1) Why is /o deprecated? What is its replacement?
2) Is there an option that skips generation of .obj and creates .exe
directly from [regex]\.c(pp)?[/regex] ?
From: Alex Blekhman on
"andrey the giant" wrote:
> 1) Why is /o deprecated? What is its replacement?

There is no /o compiler options in VC++ compiler at least since
VC6 (I cannot check earlier versions). What is the version of the
compiler you refer to?

> 2) Is there an option that skips generation of .obj and creates
> .exe directly from [regex]\.c(pp)?[/regex] ?

AFAIK, no. Why is it a problem?

Alex



From: andrey the giant on
On Nov 5, 2:51 am, "Alex Blekhman" <tkfx.NOS...(a)yahoo.com> wrote:
> "andrey the giant" wrote:
> > 1) Why is /o deprecated? What is its replacement?
>
> There is no /o compiler options in VC++ compiler at least since
> VC6 (I cannot check earlier versions). What is the version of the
> compiler you refer to?
Really? Then how do you explicitly state the file name of the
resulting executable?

> > 2) Is there an option that skips generation of .obj and creates
> > .exe directly from [regex]\.c(pp)?[/regex] ?
>
> AFAIK, no. Why is it a problem?
Other compilers, such as gcc and icc, directly create the executable
from the source unless you run it in two stages:
$(CC) -c foo.c -o foo.o
$(CC) foo.o -o bar

When I run VC9, $(CC) foo.c -o bar.exe creates foo.o, when I didn't
ask for it.
From: andrey the giant on
On Nov 5, 2:51 am, "Alex Blekhman" <tkfx.NOS...(a)yahoo.com> wrote:
> "andrey the giant" wrote:
> > 1) Why is /o deprecated? What is its replacement?
>
> There is no /o compiler options in VC++ compiler at least since
> VC6 (I cannot check earlier versions). What is the version of the
> compiler you refer to?

Looking at the output of cl /?, /o maps to /Fe, /Fo, /Fp depending on
presence or absence of /c, /E

I'm guessing the deprecation warning says "/o is undocumented, use at
your own risk". Being a UNIX guy, I'm used to using -o to specify
output.
From: Victor Bazarov on
andrey the giant wrote:
> On Nov 5, 2:51 am, "Alex Blekhman" <tkfx.NOS...(a)yahoo.com> wrote:
>> "andrey the giant" wrote:
>>> 1) Why is /o deprecated? What is its replacement?
>> There is no /o compiler options in VC++ compiler at least since
>> VC6 (I cannot check earlier versions). What is the version of the
>> compiler you refer to?
> Really? Then how do you explicitly state the file name of the
> resulting executable?
>
>>> 2) Is there an option that skips generation of .obj and creates
>>> .exe directly from [regex]\.c(pp)?[/regex] ?
>> AFAIK, no. Why is it a problem?
> Other compilers, such as gcc and icc, directly create the executable
> from the source unless you run it in two stages:
> $(CC) -c foo.c -o foo.o
> $(CC) foo.o -o bar
>
> When I run VC9, $(CC) foo.c -o bar.exe creates foo.o, when I didn't
> ask for it.

So, you're saying that it should blow away all temporary files it
creates in the process, except for the one you explicitly asked? Post a
suggestion the the VC++ bug database. I wouldn't hold my breath.

BTW, if you do it with G++, like

g++ foo.c -o bar

, does G++ create 'foo.o' as a intermediate result? If yes, does it
dispose of it afterwards? Or do you still see 'foo.o' lying around
after 'bar' is created?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask