From: silkwodj AT my-dejanews DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: Please: Newbie and "Who's Afraid of C++" needs help w/djgpp Date: Sun, 11 Oct 1998 23:46:02 GMT Organization: Deja News - The Leader in Internet Discussion Lines: 110 Message-ID: <6vrfvq$5uo$1@nnrp1.dejanews.com> References: <361FAD2A DOT 83A AT erols DOT com> NNTP-Posting-Host: 205.147.228.2 X-Article-Creation-Date: Sun Oct 11 23:46:02 1998 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 205.147.228.2 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > This is the out put of the set command: > > TMP=C:\WINDOWS\TEMP > TEMP=C:\WINDOWS\TEMP > PROMPT=$p$g > winbootdir=C:\WINDOWS > COMSPEC=C:\WINDOWS\COMMAND.COM > DJGPPTMP=c: > DJGPPRUN=c: > PATH=C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\MCAFEE\WEBSCAN\BROWSER\BIN > DJGPP=c:/djgpp/djgpp.env > windir=C:\WINDOWS > BLASTER=A220 I5 D1 H5 P330 T6 E620 > CMDLINE=script -f setcom > > Also post your autoexec.bat, and say > > the exact path to where djgpp is installed (the path to > > `djgpp.env'). > This is my autoexec.bat file; > > @C:\PROGRA~1\NORTON~2\NAVDX.EXE /Startup > rem - By Windows Setup - MSCDEX.EXE /D:OEMCD001 /L:F > SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\MCAFEE\WEBSCAN\BROWSER\BIN > rem - By Windows Setup - MSCDEX.EXE /D:OEMCD001 /L:F > rem - by djgpp setup > set djgpptmp=c: > set djgpprun=c: > set DJGPP=%djgpprun%\DJGPP\DJGPP.ENV > set PATH=%djgpprun%\DJGPP\BIN;%PATH% > call setdjgpp %djgpprun%\djgpp %djgpprun%/djgpp > > The exact path to djgpp.env is: > > c:\djgpp\djgpp.env > > > > > Finally, tell us exactly what you typed to compile that program. > > If you ran a batch file, tell us exactly what the batch file > > says. Also post all the error messages produced. The simplest > > way to do this is instead of calling: > > > > gcc ..... > > > > call this: > > > > redir -o output.txt -eo gcc -v ..... > > > > `-v' means to give more information about what gcc is doing. > > When you perform this command you won't see the output on the > > screen, but you can read it in `output.txt'. Please include > > that file in your next posting too. > > The batch file I ran is mk.bat. It reads as follows: > > cd ..\code > call mknorm %1 > cd ..\normal > > Under the directory c:\whos\normal this is what I typed to compile the > program itemtst1: > > mk itemtst1 > > Since I am a relative novice at programming I may have made a mistake in > carrying out your final request, but this is exactly what I typed and > what was generated. Please let me know what I did wrong. > > c:\whos\normal>redir -o output.txt -eo gcc -v mk itemtst1 > > output.txt reads as follows: > > gcc.exe: mk: No such file or directory (ENOENT) > gcc.exe: itemtst1: No such file or directory (ENOENT) > Reading specs from c:/djgpp/lib\specs > gcc version 2.7.2 > > Thanks for your help. > Okay Danny, When Steve Heller prepared the examples for his book, he chose to hide the somewhat stark command line processing required to compile using gcc, which is the heart of DJGPP. You can follow his examples by tracing through his batch files to get an insight though. MK.BAT merely accepts a string arguement (% 1,the name of the example program you wish to compile) and passes it to another batch file MKNORM.BAT in the C:\WHOS\CODE directory. Look at the MKNORM.BAT listing. When you follow down for itemtst1.cc you will notice that he calls gcc by addressing drive z: Now in the installation instructions in the book he asked to have lines like "subst z: c:\" and "subst y: c:\" for running the compiler from the hard drive. Then you would have "set DJGPP=z:\DJGPP.ENV" and "set PATH=z:\DJGPP\BIN;%PATH%". He did this to allow some users run the compiler environment right from the CDROM by just changing to "subst z: d:\". From what you have posted, your installation of DJGPP is fine on your hard drive. At this point you can either add the z's and y's to your AUTOEXEC.BAT, or modify the MKNORM.BAT to change all the z: and y: instances to c: all should be fine then. As a further note, when you followed George Foot's advice regarding "redir" you tried to pass a file named MK to the compiler itself. It went bonkers over that. Good Luck - there's a long path ahead. Dave -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own