delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/03/05:17:33

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GCC question
Date: 28 Jul 1997 23:40:31 GMT
Organization: Oxford University, England
Lines: 44
Message-ID: <5rjalf$ocf@news.ox.ac.uk>
References: <19970728213301 DOT RAA24433 AT ladder01 DOT news DOT aol DOT com>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Lovecraft (lovecraft AT aol DOT com) wrote:
: I keep getting this message no matter what I type( i.e. gcc -o first.c
: first.exe and various other syntaxes referred to in various documentation)
: , based of course on all the documentation which I've read, when trying to
: compile a simple prgram to see if it works:

: ld.exe: cannot open crt0.o: no such file or directory (ENOENT)

Okay, when you pass gcc the `-o' switch that means that it should send its
output to the following file. You want this filename to be the executable,
not your source code, so you should probably try:

gcc first.c -o first.exe

The error message you received refers to crt0.o, which is always linked
into your programs to make the executable. This file should be in the
`lib' subdirectory of your main djgpp directory. If it's not there, you
did not download and unzip the file v2/djdev201.zip correctly. If it is
there, you may not have set the DJGPP environment variable correctly.

To clarify for the former case: When installing the zip files, create a
directory for djgpp, go into that directory, and unzip *all* the zip files
except Allegro's from that place, recreating their directory structures.

For the second possible problem, you must set the environment variable
DJGPP to the full path and filename of the file `DJGPP.ENV'. For example,
if your base djgpp directory is C:\DJGPP, you would put in your
autoexec.bat:

set djgpp=c:/djgpp/djgpp.env

If all this is done, try adding the `-v' switch to gcc's command line and
posting the results here.

You might consider getting DJVERIFY. This utility is not complete, but it
is intended to check that people have installed djgpp properly. I'm not
sure where you can get it from; I think perhaps FTP from ftp.delorie.com,
in an alpha directory maybe? I think the filename is vrfy033a.zip or
something similar. It can produce a full, detailed report of your
configuration which you can post here.

-- 
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford

- Raw text -


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