public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Directory of object files
@ 1999-11-21 17:50 Kai Yue
  1999-11-30 23:28 ` Kai Yue
  1999-12-06  9:41 ` Shawn
  0 siblings, 2 replies; 5+ messages in thread
From: Kai Yue @ 1999-11-21 17:50 UTC (permalink / raw)
  To: help-gcc

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Directory of object files
  1999-11-21 17:50 Directory of object files Kai Yue
@ 1999-11-30 23:28 ` Kai Yue
  1999-12-06  9:41 ` Shawn
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Yue @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Directory of object files
  1999-11-21 17:50 Directory of object files Kai Yue
  1999-11-30 23:28 ` Kai Yue
@ 1999-12-06  9:41 ` Shawn
  1999-12-06  9:41   ` Shawn
  1999-12-31 22:24   ` Shawn
  1 sibling, 2 replies; 5+ messages in thread
From: Shawn @ 1999-12-06  9:41 UTC (permalink / raw)
  To: help-gcc

"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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Directory of object files
  1999-12-06  9:41 ` Shawn
@ 1999-12-06  9:41   ` Shawn
  1999-12-31 22:24   ` Shawn
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn @ 1999-12-06  9:41 UTC (permalink / raw)
  To: help-gcc

"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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Directory of object files
  1999-12-06  9:41 ` Shawn
  1999-12-06  9:41   ` Shawn
@ 1999-12-31 22:24   ` Shawn
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

"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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-12-31 22:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-21 17:50 Directory of object files Kai Yue
1999-11-30 23:28 ` Kai Yue
1999-12-06  9:41 ` Shawn
1999-12-06  9:41   ` Shawn
1999-12-31 22:24   ` Shawn

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).