Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!awdprime!excalibur.austin.ibm.com!jaime From: jaime@excalibur.austin.ibm.com Newsgroups: comp.unix.aix Subject: Re: cc -o -c Message-ID: <8118@awdprime.UUCP> Date: 31 May 91 19:54:06 GMT References: Sender: news@awdprime.UUCP Reply-To: user@machine.domain Distribution: comp Organization: AIX Technical Support - Austin Lines: 35 In article , auvnele@auvc7.tamu.edu (Eric L. Nelson) writes: > Path: awdprime!auschs!romp!cs.utexas.edu!helios!auvnele > From: auvnele@auvc7.tamu.edu (Eric L. Nelson) > Newsgroups: comp.unix.aix > Subject: cc -o -c > Message-ID: > Date: 30 May 91 22:15:00 GMT > Sender: usenet@helios.TAMU.EDU > Distribution: comp > Organization: Computer Science, Texas A&M University > Lines: 7 > > I'm working on a large software program where sources are in one > directory and objects go into another. I cannot get: > > cc -c -o../dir/foo.o foo.c > > to put foo.o in ../dir. It insists on putting it in the same dir as > foo.c. Sorry. Won't do it. The -o flag is passed to the linker to rename the final linked object. The output of the compiler is always .o. Because you specified the -c flag, all you get is foo.o. Also, the compiler places the object in the current directory. Maybe you need to try: cc -c ../dir/foo.c instead. Jaime Vazquez Voice: 512-838-4829 or t/l 678-4829 AIX Technical Support Fax: 512-838-4851 or t/l 678-4851 IBM AWD-Austin/2830 6000: jaime@excalibur.austin.ibm.com InterNet: jaime@austin.vnet.ibm.com or jaime%austin@vnet.ibm.com -------------------------------------------------------------------- <>