Trouble with "cc -o"

Trouble with "cc -o"

Post by Youri N. Podchos » Sat, 07 Oct 1995 04:00:00



|> The following command generates 'main.o' in the current directory instead
|> of in 'c'.
|>
|> cc -c -o c/main.o main.c
|>
|> I am running ODT 3.0 OS/DEV. This command behaved as expected on a Sun
|> workstation. I've checked for an SLS to correct this but did not find
|> one. Does anyone have a way around this? As this problem clobbered a
|> freeware compilation, should I use gcc instead?
|>
|> Thanks for any info.

SCO's cc (at least before OSR5) treats -o as a flag naming the execuable
module, instead of a.out, but not the object module.  What you need is
-Fo instead of -o.

+---------------------------------------------------------------------+
| Youri N. Podchosov (ynp) * Davidsohn & Son, Inc. NYC * 718-234-4140 |

+---------------------------------------------------------------------+