![](/uploads/1/2/7/6/127646696/251847707.png)
On This Page
A. Introduction
This document describes how to install and configure TextPad for use with Cygwin on a Windows home computer for the course CS-11: Introduction to Programming Concepts and Methodology, C++.
Textpad is useful when just getting the job done is work enough, the last thing you need is to waste time having to learn yet another computer application. Your experience with other tools should be relevant to each new application, making it possible to sit down and use that new application right away. Buy a TextPad - license - 1 user, 1 site or other Document Management Software at CDW.com.
TextPad is already installed on CTC and lab machines under the CIS and CS directory. You can download a copy of TextPad for evaluation at home as well. There is no charge for the download, but you must pay for the software if you decide to keep it. A single user license costs only $27 US dollars. Your instructor is a licensed user.
Note that TextPad only runs on computers using Windows. Usually both Linux and OS X (Apple) systems have good text editors already installed.
If you need more help, you can consult TextPad's Support information. Or better yet, ask a classmate if they were able to get it set up.
B. Before You Begin
These instructions assume that you have already installed Cygwin as described in the document How to Install Cygwin. If you have not installed Cygwin, do so now.
C. Installing TextPad
Download TextPad and install it following the Installation Instructions. Note that there are TextPad versions 4 through 8 and these instructions have been tested on to version 7. Install the bit-size (64 or 32) of TextPad that matches your computer.
Once the installation is complete, you should configure TextPad as described below. Completing the following steps will make your programming easier.
D. Adding a Blank Line
You should have TextPad add a blank line to the end of every file to prevent the warning, 'No newline at end of file', when you compile a program.
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on Editor
- Check the Automatically terminate the last line of the file checkbox
- Press either the Apply or OK buttons.
E. Enabling Line Numbers
You should enable line numbers so you can more easily find errors reported by the compiler.
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on View
- Check the Line Numbers checkbox
- Press either the Apply or OK buttons.
F. Configuring Tab Settings
Configure tab settings to correctly format source code files and prevent loss of style points on assignments.
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Expand the Documents Classes by clicking on the '+' sign.
- Expand the C/C++ tree
- Click on Tabulation
- On the right side there should be two checkboxes labeled 'Convert new tabs to spaces' and 'Convert existing tabs to spaces when saving'; check both of the checkboxes.
- Press either the Apply or OK buttons.
G. Enabling Syntax Highlighting
You need to enable syntax highlighting so that your source code files are display in color for keywords and strings.
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Expand the Documents Classes by clicking on the '+' sign.
- Expand the C/C++ tree
- Click on Syntax
- On the right side, check the 'Enable syntax highlighting' checkbox.
- In the 'Syntax definition file' drop down list, select 'cpp.syn'.
- Press either the Apply or OK buttons.
H. Setting the System Path
To configure Notepad++ to compile C++ using Cygwin, you must add the Cygwin
bin
directory to your computer's PATH environment variable. The PATH variable stores the directories where executable code is located.Caution: Setting the path on Windows is a potentially dangerous operation and could temporarily disable your computer if done incorrectly. If you follow these instructions carefully, you and your computer will be fine. If this warning makes you too nervous, then get someone to double-check you as you perform these steps.
- Locate the path to the Cygwin
bin
directory on your computer, using Windows Explorer or another tool, and record the path. Some usual paths are:- Cygwin:
;C:cygwinbin
- Cygwin64:
;C:cygwin64bin
- Cygwin:
- Open the Computer or System window by one of the following methods:
- In the Search field, type System and select System from the list. If more than one System appears, select the one related to Control Panel.
- Right-click on Computer and click Properties.
- Windows 10: Open the Control Panel, click System and Security and then click System.
- Older Windows: Open the Control Panel and then click System
For more help search for Windows System Properties. - Open the System Properties dialog by clicking on the Advanced system settings link.
- In the System Properties dialog, click the Environment Variables button.
- In the Environment Variables dialog locate the Systems Variables section (bottom half), scroll through the list and highlight the Path variable, and then click the Edit button.You will see the Edit environment variable dialog or, on older Windows, the Edit System Variable dialog shown below.
- Add the path to the Cygwin
bin
to the end of the Variable list using one of the following:- Windows 10 (click)
- Older Windows (click)
I. Compiling C++ Programs
After you have set the path, you can set up TextPad to compile programs.
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on the Tools node of the tree.You will see a Tools dialog with an Add drop-down menu.
- Click on the Add button and then Program...The Select a file dialog appears.
- Browse to the folder in which you installed Cygwin and open the
bin
directory, select theg++.exe
file and press the Open button. - Press the Apply button.G++ should now appear as a choice in the Tools tree.
- Expand the Tools tree and click on the G++ tool.You should see a dialog like the following appear:
- Make sure the Command text field is like the one shown.
- Set the Parameters text field to be:
-Wall -Wextra -Wpedantic -o $BaseName $File
- Check the checkboxes as shown.
- Set the Regular expression to match output text field to:
^(((.[^:])|([A-Za-z]:))[^:]+):([0-9]+):
For TextPad 7 and later set the regular expression to:^(.[^:]+):(d+):
- Set the Registers as shown.
- Click the Tools node in the tree and you will see a list of tools. (1)
- Click slowly two times on the G++ label on the right-hand side, which will allow you to change the tool name. (2)Note: do NOT click on the G++ label under Tools on the left side.
- Rename G++ to something like Compile C++
- Press the OK button.
You can now compile C++ programs by selecting Compile C++ from the Tools menu. You can test the configuration by saving the following program as
hello.cpp
and then compiling. Verify that the file hello.exe
is created when you compile.J. Running C++ Programs
After you have set the path, you can set up TextPad to run programs after compiling with the following steps:
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on the Tools node of the tree.You will see a Tools dialog with an Add drop-down menu.
- Click on the Add button and then DOS Command...The Tool dialog appears.
- In the Tools dialog type:
cmd.exe
and press the OK button - Press the Apply button in the Preferences dialog.cmd.exe should now appear as a choice in the Tools tree.
- Rename the cmd.exe to Run C++ by clicking on the Tools node of the tree and then double-clicking on the cmd.exe tool.
- Expand the Tools tree and click on the Run C++ tool.
- Change the Parameters to:
$BaseName
- Make sure the Initial folder is set to $
FileDir
- Uncheck the Capture Output checkbox.
- Press the OK button.
You can now run C++ programs by selecting Run C++ from the Tools menu. Remember that you must compile the program before you try to run it.
K. Configuring Astyle
![Android Android](/uploads/1/2/7/6/127646696/909363197.png)
Astyle is a tool for formatting the style of your code. Artistic Style is installed with Cygwin. To configure the tool to run with TextPad, use the following instructions:
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on the Tools node of the tree.You will see a Tools dialog with an Add drop-down menu.
- Click on the Add button and then Program...The Select a file dialog appears.
- Browse to the Cygwin
bin
directory (C:cygwin64bin
), select theastyle.exe
file and press the Open button. - Press the Apply button.Astyle should now appear as a choice in the Tools tree.
- Expand the Tools tree and click on the Astyle tool.
- Change the Parameters to:
-A2 -s4 -p -xC80 $File
- Make sure the Initial folder is set to $
FileDir
- Make sure both the Capture output and Sound alert when completed options are checked.
- Press the OK button.
You can now automatically style your code by selecting Astyle from the tools menu.
L. Configuring the Documentation System
Doxygen is a tool for generating API documentation in HTML format from documentation comments in source code. To configure the tool to run with TextPad, use the following instructions:
- Download the following configuration file and save it in your Cygwin directory (
C:cygwin64bin
): - From TextPad's Configure menu, choose Preferences.The Preferences dialog appears with a tree on the left side.
- Click on the Tools node of the tree.You will see a Tools dialog with an Add drop-down menu.
- Click on the Add button and then Program...The Select a file dialog appears.
- Browse to the bin directory of where you saved
doxygen.exe
, select thedoxygen.exe
file and press the Open button. - Press the Apply button.
Doxygen
should now appear as a choice in the Tools menu. - Expand the Tools menu and click on the Doxygen tool.
- Change the Parameters line to:
C:cygwin64binDoxyfile.cfg
If you saved the files somewhere else, you will need to change the path shown above. - Set the Regular expression to match output to:
^(((.[^:])|([A-Za-z]:))[^:]+):([0-9]+):
- Set the Registers as follows:
- File: 1
- Line: 4
- Check the checkbox labeled Capture output
- Also, check the checkbox labeled Sound alert when completed
- Press the OK button.
After configuring the documentation system, you should run a sample program to verify the installation works correctly. One simple program you can run is the commented version of
hello.cpp
shown below:To test the documentation configuration:
- From the File menu, choose New.
- Copy the above program to the new document page of TextPad.
- From the File menu, choose Save and save the file using the name
hello.cpp
to a convenient location like the Desktop. - From the Tools menu, choose Doxygen.If there are no errors or warnings, you will return to the file document:
hello.cpp
. If there are errors or warnings, you will see a list of them in theCommand Results
page of TextPad. - On the Desktop, double click the
html
folder and find the file named:index.html
. - double-click the
index.html
file to open it in a web browser and view the generated documentation.
M. Configuring Keyboard Shortcuts (Optional)
After compiling and running programs many times, people get tired of using the menus. You can create shortcut keys for TextPad's tools to make compiling and running programs faster and easier as follows:
- Click on the Configure menu and then Preferences.The Preferences dialog appears with a tree on the left side.
- Click on the Keyboard node of the tree.You will see Categories and Commands as shown below.
- Select the Tools category from the list, and the tools commands will be displayed.
- Select the Tools command you wish to set a shortcut for.
- Type the keyboard shortcut combination in the 'Press new shortcut key' box.Typically, tools are two key combinations using the Ctrl key and a number.
- Click the Assign button to set the shortcut.
- After assigning all the keyboard shortcuts, press the OK button.
Since I use TextPad for both Java and C++, I have set up the shortcuts as shown below:
Lord Shiva himself had to take the form of Hanuman and planted himself in the womb of Anjana, wife of Kesari, king of the monkeys.Pawan, the wind-God, helped Shiva in bringing Hanuman to life to end the misery and havoc wreaked by Ravan on rishi munis as he tortured them and invited their wrath. The rishis, in turn, cursed him that he would meet his downfall at the hands of Hanuman when a noble King would make him pay for his sins.While Hanuman has been part of our lives since the days of Doordarshan and the late Ramanand Sagar's Ramayan, it's also taken animated forms in endearing children's films, so it's painful to sit through this tacky production.
Ravana's sword is a cardboard toy while the torture scenes of the rishi munis are funny, to say the least.
| ||||
User Interface: | Online Help/ Spelling: | Version/ Date: | Download: | |
---|---|---|---|---|
English | English/ American, British & Canadian | 8.2.0 26-May-2019 | 64-bit | 32-bit |
French | French/ French | 8.2.0 26-May-2019 | 64-bit | 32-bit |
German | German/ German (old & reform) | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Dutch | English/ Dutch | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Italian | Italian | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Spanish | Spanish | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Portuguese | Portuguese | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Japanese | Japanese/ American | 8.2.0 26-May-2019 | 64-bit | 32-bit |
Korean | English/ American | 8.2.0 26-May-2019 | 64-bit | 32-bit |
User Interface: | Online Help/ Spelling: | Version/ Date: | Download: | |
---|---|---|---|---|
English | English/ American, British & Canadian | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
French | French/ French | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
German | German/ German (old & reform) | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Dutch | English/ Dutch | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Italian | Italian | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Spanish | Spanish | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Portuguese | Portuguese | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Korean | English/ American | 7.6.4 07-Mar-2017 | 64-bit | 32-bit |
Installation Instructions:
After you have downloaded the zip file, extract the EXE file, run it and follow the instructions.
Important:
- You cannot install both the 32 and 64-bit editions on the same computer.
- When upgrading from the previous major release (eg. 7 to 8), the installation process will try to preserve your current TextPad settings.
Minimum Requirements:
- Windows compatible PC with a Pentium 4 processor supporting SSE2 instructions (first introduced in 2001).
- TextPad 8 runs on the 32-bit and 64-bit editions of Vista, Windows 7, 8.1 and 10, and on Server 2008 and 2012.
- TextPad 7 runs on the 32-bit and 64-bit editions of XP, Vista, Windows 7, 8.1 and 10, and on Server 2003, 2008 and 2012.
Download Problems:
If you try to download any file several times, you will see the error message 'You have reached your download limit for this file'. This is to throttle those sites in the Far East which repeatedly download TextPad all day, every day, for unfathomable reasons. Apologies for any inconvenience this causes, but please try again later.
If you are experiencing slow transfer rates, the problem could be anywhere on the Internet between your PC and our server. Before reporting problems to us, please first check where they are occurring, as follows:
- Start a Command (DOS) prompt. (Start/Programs/Accessories/Command Prompt.)
- Type tracert textpad.com.
- In the report that is produced, look for timeouts.
- If they are occurring in our domain, please paste the results into an email and send it to customer support, giving details of the time of day, and the file you were downloading.
Please note: to protect against denial of service attacks, our servers do not respond to pings, so timeouts will always occur in the final traceroute step.
top![](/uploads/1/2/7/6/127646696/251847707.png)