Setting Up Edit Plus to Compile C++

Locate where the bin folder was created for the g++ installation. On my Windows XP machine, it was created in the following path:

C:\MinGW\bin  

You now should add it to the PATH environment variable. You do that by following:

 

1)      Open the Control Panel on your system.

2)      Select System.

3)      Select Advanced.

4)      Select Environment Variables.

5)      Under System variables, scroll down to the variable Path.  Click on Path.  Select Edit.

6)      At the end of this variable value, add the text “;c:\MinGW\bin”, without the quotes.  Note you are adding a semi-colon, followed by the path (directory path) to the location of g++.exe on your computer.  Don’t get rid of the data already part of Path, just add this text to the end of it.

7)      Select OK. Select OK. Select OK.  Quit Control Panel.

    

 

Now we're going to add the tools commands to our edit plus application. If you haven't done it already, download Edit Plus 2 Setup Executable

1) Go to the tools menu, and you should see a blank listing where your compile and run tools will eventually be.
Select "Configure User Tools..."



2) You should see the following screen. Click the "Add tool >>" button, and then select "Program"




3) For your program to compile using MinGW... In the command field, type in  "g++.exe".
For the argument, you'll put (without quotes): "-g  $(FileName) -o $(FileNameNoExt).exe"
For the initial directory (again, without quotes): "$(FileDir)"
Lastely, you want to select the checkbox "Capture Output" and “Save open files”.
In the end, your screen should look like this.
Also, feel free to name your tool command whatever you want.





4) Alright, one more tool to add. This one is the run command (it's easy).
Same procedure, click the "Add tool >>" button, and select "Program". This will be our "Run C++" command. For command (no quotes), type "$(FileNameNoExt)" Do not put anything in the argument field. Lastely, "$(FileDir)" without the quotes, just like last time. Do not check the capture output checkbox. Your tool menu should like this.



5) Hit "Apply", then "Ok". That's it, you're all set to compile and run C++ programs on your own.
Just remember to test your programs on a school computer to make sure they function the same as they did on your computer (they should, it's just a precaution)
Below is what your completed tool list should look like.



That's it! You've installed and set up EditPlus to compile and run C++ programs on your own! If you have any questions, please feel free to email me. I ask that you please put at least the phrase "CS 105" in your subject line.


Please send questions or comments to hanrath@iit.edu
Copyright Jon Hanrath, 2010