Message-ID: <389259CC.B66794EB@toad.net> From: Vladimir Zotikos X-Mailer: Mozilla 4.7 [en]C-NECCK (Win95; U) X-Accept-Language: en,el MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: New to DJGPP and programming,please help? References: <20000128012847 DOT 02031 DOT 00000382 AT ng-fy1 DOT aol DOT com> Content-Type: multipart/alternative; boundary="------------4A3B0F7B70B5E6D6D01210FE" Lines: 159 Date: Fri, 28 Jan 2000 22:09:00 -0500 NNTP-Posting-Host: 209.150.114.53 X-Complaints-To: abuse AT toad DOT net X-Trace: news.abs.net 949115466 209.150.114.53 (Fri, 28 Jan 2000 22:11:06 EST) NNTP-Posting-Date: Fri, 28 Jan 2000 22:11:06 EST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com --------------4A3B0F7B70B5E6D6D01210FE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MEESES 69 wrote: > I've recently bought a book called SAMS Teach Yourself C++. > It says it includes CD-ROM with DJGPP Compiler. > i selected almost all the options when installing but it didnt put a link to > it in my program files in WIN 98 and when I go to the DJGPP directory most of > the files are unasociated and I cant open them. How do I get I started? > I'm looking for a program like word 97 that opens up, is that how this > works? > I'm totally lost and would appreciate an E-mail with help. Maybe just a few > starting poiinters or hints would help. > I know I should probably read the other SAMS learn programing first but I want > to play a little now. DJGPP is not at all like MS Word or any other windows program that you are used to. I just started about a little over a month ago with a similar Sams book on C++. The installation will not give you much in terms of a program icon you can click and get to the DJGPP. You'll have to get to where you installed these files and get to it that way. To practice your programs there are at least two ways you can do this. The first I believe is the hardest but many people in this newsgroup swear by it. This method is as follows: Go to dos either by clicking on the MSDOS Prompt icon or get out of windows and then go to dos by shutting down and choosing Restart in MS-DOS mode option when prompted. Some insist going with the latter. But it is inconvenient if you ask me. Then go to the directory which contains DJGPP, then to subdirectory bin (djgpp\bin). Once there, then you'll be using a program called gxx.exe (for c++ programs) to compile your programs. The typical dos prompt command syntax when using this method is: gxx -o filename.exe filename.cpp the -o tells the compiler to output the compiled file as specified by you ( in this case filename.exe). Without the -o switch the compiled file would be named a.out by default. Don't ask why. Another switch is the -Wall switch with you place it after gxx and before -o and it will comment on compile errors and even gives the line number which contains the error. It took me a week of posting questions and trying to figure out by the documentation and faqs that filename.exe and filename.cpp also should contain the full path of the files. You'll be compiling again and again, so keep the full path short. To do this, create a working directory somewhere close to c:\ preferably directly under c:\ and give it a short name (maybe even just a letter short, such as c:\w\ ) and save all the c++ files you create there, then use that path and the filename when you compile. You can also use the same path for the filename.exe so the compiler will place the new exe files in that directory otherwise it will dump everything in \bin and you'll be hunting all over to run your new little program. Talking about creating files, you can use notepad to write your c++ programs and then save it in your working directory, or spend a couple of weeks trying to figure out emacs which may be bundled in that mess. Finally, after you write your program and compiled it, while at the dos prompt again, go to the working directory and type your new filename. The program should run. The second method may be a bit easier than the above, that is if you opted for the RHIDE interface when you installed the djgpp files. This program which you'll find in the djgpp\bin directory is easier to use and you can write, compile and test run your programs. I am running WIN95 and RHIDE has worked well for me. It is also windowed therefore if you are used to windows you may feel more comfortable using it. As a matter of fact, you can create a shortcut form the rhide.exe file, place it on your desktop and run it with a click of your mouse. Of course, you'll need to read as much of the documentation and faq files for all the other details. Good luck with your programming. Vlad. --------------4A3B0F7B70B5E6D6D01210FE Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit  

MEESES 69 wrote:

I've recently bought a book called SAMS Teach Yourself C++.
It says it includes CD-ROM with DJGPP Compiler.
  i selected almost all the options when installing but it didnt put a link to
it in my program files in WIN 98 and when I go to the DJGPP directory most of
the files are unasociated and I cant open them. How do I get I started?
   I'm looking for a program like word 97 that opens up, is that how this
works?
 I'm totally lost and would appreciate an E-mail with help. Maybe just a few
starting poiinters or hints would help.
I know I should probably read the other SAMS learn programing first but I want
to play a little now.
DJGPP is not at all like MS Word or any other windows program that you are used to.
I just started about a little over a month ago with a similar Sams book on C++.
The installation will not give you much in terms of a program icon you can click and get to the DJGPP. You'll have to get to where you installed these files and get to it that way.

To practice your programs there are at least two ways you can do this. The first I believe is the hardest but many people in this newsgroup swear by it. This method is as follows:

Go to dos either by clicking on the MSDOS Prompt icon or get out of windows  and then go to dos by shutting down and choosing Restart in MS-DOS mode option when prompted. Some insist going with the latter. But it is inconvenient if you ask me.

Then go to the directory which contains DJGPP, then to subdirectory bin (djgpp\bin). Once there, then you'll be using a program called gxx.exe  (for c++ programs) to compile your programs. The typical dos prompt command syntax when using this method is:
        gxx -o filename.exe filename.cpp
the -o tells the compiler to output the compiled file as specified by you ( in this case filename.exe). Without the -o switch the compiled file would be named a.out by default. Don't ask why.
Another switch is the -Wall switch with you place it after gxx and before -o and it will comment on compile errors and even gives the line number which contains the error.
It took me a week of posting questions and trying to figure out by the documentation and faqs that filename.exe  and filename.cpp also should contain the full path of the files. You'll be compiling again and again, so keep the full path short. To do this, create a working directory somewhere close to c:\ preferably directly under c:\ and give it a short name (maybe even just a letter short, such as c:\w\ ) and save all the c++ files you create there, then use that path and the filename when you compile. You can also use the same path for the filename.exe so the compiler will place the new exe files in that directory otherwise it will dump everything in \bin  and you'll be hunting all over to run your new little program.
Talking about creating files, you can use notepad to write your c++ programs and then save it in your working directory, or spend a couple of weeks trying to figure out emacs which may be bundled in that mess.
Finally, after you write your program and compiled it, while at the dos prompt again, go to the working directory and type your new filename. The program should run.

The second method may be a bit easier than the above, that is if you opted for the RHIDE interface when you installed the djgpp files. This program which you'll find in the djgpp\bin directory is easier to use and you can write, compile and test run your programs. I am running WIN95 and RHIDE has worked well for me. It is also windowed therefore if you are used to windows you may feel more comfortable using it. As a matter of fact, you can create a shortcut form the rhide.exe file, place it on your desktop and run it with a click of your mouse.

Of course, you'll need to read as much of the documentation and faq files for all the other details.
Good luck with your programming.

Vlad. --------------4A3B0F7B70B5E6D6D01210FE--