Valhalla Legends Forums Archive | General Programming | Compiler

AuthorMessageTime
ArC
Can you direct me where i can download a good c++ compiler, The one that came with the book is useless.
January 28, 2003, 5:34 PM
MrRaza
go to download.com for Boodshed-Dev C++ 6.0 is pretty good. Or you can download Microsoft Visual Studio 6.0(or 7; havent seen it) off kazaa.


There's alot of them out there..
January 28, 2003, 6:00 PM
dRAgoN
What book?
January 28, 2003, 6:02 PM
WolfSage
What compiler?
January 28, 2003, 7:03 PM
Spht
What good?
January 28, 2003, 7:09 PM
ArC
The book is " How To ProGram C++ by Deitel and Deitel". By the way is Visual C++.net a compiler if it is am sorry am new to this.
January 28, 2003, 7:23 PM
iago
First get textpad, it's freee and supports java by default, and you can download other stuff for it:
http://www.textpad.com/download/

Then get this, which is freeware (I think it's a port from unix, actually, but eh?):
http://www.delorie.com/djgpp/zip-picker.html


Here's a full description and whatnot from my school's website (that's where I found this):


--------------------------------------------------------------------------------

 
djgpp for Textpad
When I mentioned that it is possible to hook C++ to textpad, someone asked if I would post instructions. Here they are - beginning with an important preamble: As has been stated many times, you are expected to use g++ under Unix for your C++ assignments. As has also been stated, you are free to develop code on other platforms, provided you understand that no code not running under the stated platform for an assignment will be accepted, nor will extensions will be granted for porting your code in the event that the platform differences were bigger than you imagined. While porting is not generally a significant issue in Java, it is a significant one in C++. For those of you looking for a non-Unix development platform (even though this is not encouraged) or those simply interested in having a good, compact, c++ for windows, a port of gnu c++ for windows exists in the form of djgpp. Unlike visual C++, djgpp code will generally be reasonably close to g++ code. Once again, that does not put the onus anywhere but on you to ensure that your code runs on the required platform at the time it is due. However, if you do desire to install djgpp on your own system, you can also hook it to the textpad environment you are used to. Here's how you do it - I have successfully done this under Win2k and Win98. I cannot offer any guarantees for other versions (nor much support; I can't know what's wrong if I don't run those OS's!).

First, you need textpad; if you don't have it you can get it from http://www.textpad.com/download/. I'm assuming you have textpad installed in these instructions (so install it if you don't).


Then you need the djgpp compiler. It comes in pieces and what pieces you need depend on what you want to do with it. There's a nice site here: http://www.delorie.com/djgpp/zip-picker.html that picks the zips you need based on your stated needs. You'll likely want both C and C++ executable building applications; you may or may not want debuggers or the associated windows api package and other add ons. Download the zips it asks for, and assemble these in a folder called djgpp at the top level of your harddrive (i.e. c:\djgpp).

One of the items you have downloaded is an unzip executable. make sure you use that to unzip all the zip directories you just created (just open a dos command window, move to the djgpp directory, and invoke the application with *.zip as an argument to unzip everything) - don't use winzip or other unzipping applications you may own.

In addition to unzipping these things, you need to set up a couple of system variables so that djgpp knows where to find its components when running,and so that the system recognizes dgjpp. There are two different ways of doing this depending on your windows system. For win2k and friends, you'll need to modify an environment variable. To do this, bring up the control panel, open up System on the control panel, and click the Advanced tab, then click on "Environment Variables" to pull up the list of environment variables (on variants of win2k, basically get to the environment variables via the control panel). The environment variables are divided into system and user. In the system panel, edit the value for the system variable, Path. Add to the end of the existing value (i.e. DONT wipe out what's already there!): ;c:\djgpp\bin
Then move down to the user panel and add the user variable, djgpp and its value, c:\djgpp\djgpp.env

If you're using a Win98 system or similar, there is no nice display of environment variables. Instead, you need to add the variable definitions to the autoexec.bat file at the top level of your hard drive. Open it up with a text editor and take a look at it. There will be a path environment variable defined, you just need to add the new addition for djgpp to it (the same text shown above). Similarly, you need to make a similar variable declaration for djgpp and give it the value shown above (the syntax of this should be reasonably obvious given the variable declarations that are already there. You'll need to restart your system for this to be accessible.

Now you need to run Textpad and hook up the program to it. You can add the option to compile a program by going to the Configure menu, choosing preferences, clicking tools, click on the add button, and select Program. This gives you a box asking where the program to be run is tobe found - go to the djgpp directory and select gpp.exe, click Open and OK. Under the Tools menu in TextPad, there will now be Gpp option that you can choose to compile a C++ program. open Configure, preference, tools (click the plus sign beside tools) and click on the Gpp option. you'll see all the options for C++. In the Parameters box, type -Wall -o main.exe $File (this will give the compiler a set of options, including the instruction to make the name of the resulting executeable main.exe). The other two boxes are Command (which should already contain gpp.exe) and Initial Folder (which should already contain $FileDir). If these two boxes don't contain these values, set them to contain those values. Now move to the Java option and select the text in the box labelled "Regular expression to match output". Copy it to the clipboard and move back to the Gpp options and paste it in the same box there. Above this box is a set of check boxes, you should ensure that the boxes labelled "Capture output", "Save all documents first", and "Sound Alert when completed" are checked, and the others left blank.

OK, that sets up the compiler. Now you need to set up an option to run a C++ program that has just been compiled. Choose preferences from the configure menu again, click tools, and click on the Add button. select Dos Command, and type Run C++ in the box and click ok. When you open up the preferences again, there'll be a Run C++ item below the gpp option. Click on it to look at the settings for that. Chances are you won't be able to change the top box (it's set for running a dos command). For Windows 2000, the other boxes should be parameters (containing main) and initial folder (containing $FileDir). For Win98, I didn't have to change anything. There are a number of check boxes here; the important one is that Capture Output should NOT be checked (if it's on the output will appear in a nice editable Textpad window rather than a dos prompt, but you won't be able to do any INPUT, it's output only unless you're using a dos window).

That's it, this worked fine for me under both win2k and win98. I have no idea about other platforms (i.e. me, XP may be problems). Obviously I can't support your home machines, but I can answer questions about things that have been done on mine.

January 29, 2003, 11:31 AM
St0rm.iD
iago: looking at your signature, I can tell you a unicode character is two bytes of memory ;)
January 29, 2003, 4:38 PM
iago
Haha I hate you.. I also thought of that, and was going to fix it, and now you've forced me to :(
January 29, 2003, 8:42 PM

Search