From: "Shawn" <NRLax27@aol.com>
To: help-gcc@gnu.org
Subject: Re: Directory of object files
Date: Mon, 06 Dec 1999 09:41:00 -0000 [thread overview]
Message-ID: <384bf412@oit.umass.edu> (raw)
Message-ID: <19991206094100.DdwNGG0okB0SJdVKZ2V68vqHiVYSCj4aTS8Via7sI_I@z> (raw)
In-Reply-To: <38389EA5.3A48F3A1@cm-24-142-61-57.cableco-op.ispchannel.com>
"Kai Yue" <kai@cm-24-142-61-57.cableco-op.ispchannel.com> wrote in message
news: 38389EA5.3A48F3A1@cm-24-142-61-57.cableco-op.ispchannel.com ...
>
> Hi,
>
> When I run "gcc", it would put the object file in the directory where
> it is
> called rather than the directory where the source file is. I have tried
>
> gcc versions 2.7.2.3 and egcs-2.91.66 on two different machines and both
> have
> the same behavior. I am using linux and make version 3.7.6.1
>
> I am wondering if there is a way of changing this, i.e., forcing gcc
> to
> place the object file in the directory of the source file.
>
> Your help would be greatly appreciated.
>
> Kai
>
Kai,
Just use the -o command line option for gcc. If your source files are
in the ./src directory, and you also wanted to put your object files there
use:
gcc ./src/myfile.c -Wall -c -o ./src/myfile.o
-Shawn
next prev parent reply other threads:[~1999-12-06 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-21 17:50 Kai Yue
1999-11-30 23:28 ` Kai Yue
1999-12-06 9:41 ` Shawn [this message]
1999-12-06 9:41 ` Shawn
1999-12-31 22:24 ` Shawn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=384bf412@oit.umass.edu \
--to=nrlax27@aol.com \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).