Mail Archives: djgpp/1997/02/05/10:41:08
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 -