Let me just add - the Galileo is a very capable platform. I have built very large packages, including Ruby 2.0.0, and they compile at least as fast as my Ubuntu virtual machine does.
Compiling things like c++ homework problems is pretty much instantaneous. And they all load and run correctly!
That "chmod a+x" is often required if the linker does not set executable.