delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/05/10:41:08

Date: Wed, 5 Feb 1997 17:27:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Tim Hamilton <timh AT yarranet DOT net DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: Novice requires assistance
In-Reply-To: <32F91BDC.77ED@yarranet.net.au>
Message-ID: <Pine.SUN.3.91.970205172150.2719G-100000@is>
MIME-Version: 1.0

On Wed, 5 Feb 1997, Tim Hamilton wrote:

> But the command :
> 
> gcc -o hellow.o hellow.c
> 
> Came up with :
> 
> C:\GPP>gcc -o hellow.o hellow.c
> C:\GPP\BIN/ld.exe: cannot open crt0.o: No such file or directory (ENOENT)

The above command is wrong.  You should say either this:

	gcc -c -o hellow.o hellow.c

or this:

	gcc -o hellow.exe hellow.c

When you don't use -c, gcc compiles *and* links the program, so the 
argument to -o should be hellow.exe (if you indeed mean to compile and 
link in one step).  If you only want to compile, you need to keep -c.

If the above doesn't help, please run gcc like this:

	redir -o gcc.log -eo gcc -v -o hellow.exe hellow.c

then post the contents of the file gcc.log thus created.

- Raw text -


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