delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/15/20:54:14

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't produce *.o files
Date: Wed, 15 Sep 1999 13:14:32 -0700
Organization: Harvey Mudd College
Lines: 16
Message-ID: <37DFFE28.7D9E479C@hmc.edu>
References: <37DF6F31 DOT 466BC3BB AT mail DOT ru> <MPG DOT 12499def61f11d0a98b1d4 AT news DOT freeserve DOT net>
NNTP-Posting-Host: mercury.st.hmc.edu
Mime-Version: 1.0
X-Trace: nntp1.interworld.net 937426458 36020 134.173.45.219 (15 Sep 1999 20:14:18 GMT)
X-Complaints-To: usenet AT nntp1 DOT interworld DOT net
NNTP-Posting-Date: 15 Sep 1999 20:14:18 GMT
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.13pre7 i586)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Andrew R. Gillett" wrote:
> 
> In comp.os.msdos.djgpp, Artem Kuznetsov wrote:
> > I'm trying to compile .c file with gcc.exe. Everything is OK, but object
> > file is absent (parameter -o file is present!!). What  do I wrong?
> 
> -o (lower case) doesn't specify an object file, it specifies a .exe file.

It specifies an *output* file.  If you use -E, it will be a preprocessed
source; -S, assembler; -c, an object file; none of the above, an
executable.  So `gcc -c -o foo.exe foo.c' will create an object file
named foo.exe (which obviously won't run).
-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


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