Even code that simple won't compile. The error that prints is "undefined reference to 'fork'". This is usually due to not linking the appropriate library where the command is defined but I thought that was the 'unistd.h' library. Any suggestions?
That error is not a compile time error, but rather a linker error.
The linker can't find fork in any of the object libraries supplied (if any).
Check your linker instructions.