C Programming on Your Laptop
To remotely log in to one of my lab's Linux computers,
open a terminal window and type:
ssh -l <your username> -Y IP
There are several options for supporting a C programming environment on your laptop:
where IP can be one of: 18.104.22.168, 22.214.171.124, 126.96.36.199
If your computer is running Linux:
- You most likely already have gcc, gdb and emacs installed, and you should be set.
If you are using Mac OS:
If you are using Windows:
- The following are two options for supporting a Linux-like environment for widows:
- Download the mingw-get-inst installer and run it on your computer.
- When prompted, choose to use the package definitions from the installer, and check the option to install MSYS.
- When the installation is done, add C:\MingGW\bin to the system path.
- To verify that the install has completed successfully, open the MINGW shell from the Start menu, and type gcc -v
After you hit enter you should see some version information for the GNU C Compiler.
- To install a text editor, I recommend installing Emacs.
You can unzip it to C:\emacs-23.3. Then run C:\emacs-23.3\bin\addpm.exe to add it to the Start menu.
- See Emacs command summary for tips on using Emacs.
- Go to http://www.cygwin.com and click on 'Install Cygwin', located in the upper left corner of the page.
- Once downloading completes, double click setup.exe to run the setup.
Choose 'www.mirrorservice.org' for the mirror site.
Under 'Setup', choose Devel -> gcc-core, gcc-g++ and gdb, and click on 'Skip' next to these items to undo the skip option and install these and the associated files (which will get selected automatically).
Repeat this for Editors -> xemacs and xemacs-sumo.
- The rest of the installation involves leaving the default options and clicking 'next'.
- Note that the installation process could take a while.
When your installation is complete, you should be able to double click on the Cygwin icon to start Cygwin, and then type 'xemacs &' to run xemacs.
- See Emacs command summary for tips on using Emacs (or Xemacs).
- If you are using Windows, and are already familiar with the Microsoft Visual Studio environment, you may prefer to use it instead. See Using Visual Studio for Simple C Programs for more details.
- If you are a fan of the Vim text editor, you may opt to use it instead of Emacs.
- Note that either of these options are only recommended if you are already familiar with them, as we will be using Emacs/Xemacs in class.