delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/26/02:51:47

Date: Tue, 26 Jan 1999 09:49:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Sahab Yazdani <sahaby AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Intermidate AND Final Directory
In-Reply-To: <36AD23B6.B5A741A0@geocities.com>
Message-ID: <Pine.SUN.3.91.990126094844.16926K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Mon, 25 Jan 1999, Sahab Yazdani wrote:

> In Borland C++, (AND Watcom I believe) you can select where the compiler
> puts your intermidiate (.O) and release files (.EXE).  Can the same be
> done with GCC?  Is there a command line function or something. 

GCC has the -o switch that specifies where the compiler puts any files
it produces.  For example:

	      gcc -c foo.c -o c:/project/inter/foo.o

> Or do I have to declare it in my makefile?

In the Makefile, you can use the VPATH variable to tell the compiler
where to find the sources.  For example:

      VPATH = c:/project/source;c:/project/inter

> C:\PROJECT\INTER> this is where all the useless files go (*.0) that I
> can't use

Btw, if you compile and link in the same step, GCC deletes the object
files automatically.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019