From: Kevin Newsgroups: comp.os.msdos.djgpp Subject: Re: help the new guy Date: Fri, 08 Oct 1999 20:54:43 +0100 Message-ID: <9kX+N6LIij93dGOo5UsHNx=c5=VK@4ax.com> References: <37FE17E0 DOT F89A7143 AT gateway DOT net> NNTP-Posting-Host: reality-bytes.demon.co.uk X-NNTP-Posting-Host: reality-bytes.demon.co.uk:212.228.30.60 X-Trace: news.demon.co.uk 939412555 nnrp-04:6529 NO-IDENT reality-bytes.demon.co.uk:212.228.30.60 X-Complaints-To: abuse AT demon DOT net X-Newsreader: Forte Agent 1.6/32.525 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 69 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 08 Oct 1999 11:12:16 -0500, emal72 wrote: >I am a total novice. I got "teach yourself C++ in 24 hrs book. the >directions are limited, for me. What I did. I installed the prog, I >checked the memory, I went to the ride text editor, typed in my short >silly little program ( hello. exe) clicked save went to a ms dos prompt >got the message " no such file or dir" Tried compiling it got error >messages a go-go line...undefined checked my code for mistakes. >according to the book there are none so my queston is what am I doing >wrong? I find this stuff interresting but if I can't jump this hurdle >then I can't learn C++ which will frustrate me to no end so please help >me. thanks Hi ? Have you set up your paths and environmet variables and the DJGPP.ENV file (if you're using DJGPP). This is all in the documentation. You might also like to consider getting the latest version of DJGPP, if that's what you're using from http://www.delorie.com/djgpp/ Lots of info and help and documentation here. when you start RHIDE, if you are creating a new file, save your file as soon as you've created it with the right extension. for C files, use hello.c, for C++ files, use hello.cpp or hello.cc, (there are others in use for C++ files). If you save your file with the right extension, RHIDE will recognise it as a source file and you will then get syntax colouring. Having typed your program in in RHIDE, you then need to compile and link it. to produce the executable. To do this I just press F9 then (When you've fixed any errors) you can run it. I usualy press Ctrl and F9 If your program runs and then exits back to RHIDE immediately, and you dont get a chance to see what happened, then pressing Alt and F5 will show you the user screen. It is very important to read ALL the documentation that comes with RHIDE and DJGPP (If that's what you're using.) This is the usual starting point: - #include int main() { printf("Hello World!\n"); return(0); } If you type this in using RHIDE (Don't forget the semicolons and dont use ANY cApiTaLs appart from in between the quotes.) and call it hello.c, then if it compiles and links and runs, your half way to getting your compiler working. If this won't compile, then you've probably got an installation/configuration problem which will be resolved following carefull perusal of the documentation. Kevin.