Compiling

Here's a command to compile in Unix:

gcc -o executable file1.c file2.c ...   #This is for C.  For C++, the command is not gcc but g++.

This compiles file1.c, file2.c, etc., and creates an executable named "executable."

gcc -c file1.c

This compiles file1.c and gives you file1.o, the object code to be linked later:

gcc -o executable file1.o file2.c ...

With lex (unless yacc is involved too), you'll need to add -ll to the end:

gcc -o executable lex.yy.c -ll

To run, type this:

./executable

Backing up

Easiest way for me:  create a subfolder and copy everything into it:

mkdir old
cp * old

Note that if you make a typo, it won't catch it.  This code copies all files to a new file named "olf," which is not what you wanted:

mkdir old
cp * olf

To back up to another machine -- and you should -- use Dropbox.

Makefiles

A Makefile, which is named "Makefile" and resides in the directory with your code, tells Unix how to compile your program -- like a Visual Studio project file.

To run it, type make.

Here's a tutorial.  I think you can use Makefile1 or Makefile4.  I have never used the -I option.