A Work Pattern
- I assume you are working at home from a a windows machine.
- If you are on a mac or linux, we can discuss in private if you need some help.
- Here is what I see as the situation
- You probably want a graphical editor.
- If you have learned vi, emacs, nano, ... you have more options.
- You will probably need to compile your files on a linux machine.
- For this class, I want you to use cslab103 as final test platform.
- You have several choices for a "gui" environment
- You can install an IDE (Integrated Develoment Environment)
- There are many for C++.
- Bloodshed dev c++ is nice, but out of date.
- Code::Blocks is nice, but hard to make work in a simple way.
- There are others, but I didn't find a nice, free, easy to install one.
- I found using WinSCP as my "Graphics Shell" to be the best choice.
- The tools I use
- Graphical Editor
- As I said, I use notepad++, on windows
- Actually, that is a lie, I sometimes use gvim, but if you could use vi, you wouldn't be looking at this set of notes.
- You can use whatever you want.
- WinSCP as a shell
- WinSCP allows you to work on a remote machine.
- We have started to create some WinSCP tutorials here
- I have configured WinSCP to use the Editor of my choice on windows
- I use putty to work on the remote machine.
- To start a project:
- Connect with both putty and WinSCP to the remote machine.
- Create a directory for the class.
- PICK ONE:
- terminal (putty) :
- or in WinSCP:
- right click in the remote area, select New, Directory
-
- give the name (csci330).
- Change into this new directory
- terminal: cd csci330
- WinSCP: double click on the new directory
- Repeat this process to create a homework 0 directory (hw0).
- If you work in the terminal (putty) , you may need to refresh WinSCP
- Simple right click in the Remote area and select Refresh
- Edit a new file
- In WinSCP click in the remote area
- Select new file.
-
- Give it a name, hello.cpp
- This opened notepad++ and so I entered the hello world program.
- When I saved the file, it was automatically transferred to cslab013
-
- Compile
- In the terminal, i typed make hello
- There was a ; missing
-
- So I inserted the ; using notepad++, saved it and compiled.
- Add a Makefile
- Create a new file called Makefile
- Notice this opened another tab in Notepad++
-
- Save this and I can now type just make in the terminal.