Xref: news2.mv.net comp.os.msdos.djgpp:3093 From: Peter Hugh Butler Newsgroups: comp.os.msdos.djgpp Subject: Linking Problems in DJGPP v2 Date: Wed, 24 Apr 96 19:47:23 GMT Organization: Myorganisation Lines: 29 Message-ID: <830375243snz@pbutler.demon.co.uk> Reply-To: peter AT pbutler DOT demon DOT co DOT uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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