To avoid the inevitable, let me put this in context. I am instructing an Intro to Unix course this semester and the students are using Knoppix 6.4.3 off the LiveCD. They are not required to install the system to their hard drive, and I would like to not require them to, however they do have use of a USB flash drive. This version of Knoppix seems to include gcc, but NOT g++. The course curriculum requires compiling C++ programs. I know I can run:
sudo apt-get update sudo apt-get install build-essential
to install (among other things) g++, but of course this only makes sense on a system installed to a hard drive.
So my question is, can I write a script that calls gcc with appropriate options and flags to compile a C++ program that students could use in place of g++?