Mail Archives: djgpp/1996/04/25/07:27:49
Hi there, thanks very much to all the people who answered my last query.
Time for part II.
I'm having this problem:
gcc -c mfile.c
Compiles fine, but then when I link using
gcc -o mfile.exe mfile.o -lm
I get an error saying something like "Cannot find link file DJGPP.LNK".
So I copied this file from /lib into the directory where I'm compiling,
and I get another error, because the '-lm' is read as another file at the
end of the command line (something like -lm: File format not recognised).
If I leave off the -lm, it finds another switch (I think it's "-lgsomething"
or something (sorry, I'm not at work, so I can't see the exact output)), and
I get the same error.
I've checked the DJGPP.ENV file, and it seems fine, so what I would like to
know is:
a) Why isn't it finding the .lnk file?
b) Why is the switch being read as a filename?
Please reply by e-mail, as this seems like a low-level question.
--
Peter Hugh Butler
- Raw text -