You can't run Linux (or any other "modern" OS that has memory management) on a Classic because the Classic's CPU, a 68000, doesn't feature the Paged Memory Management Unit (PMMU) required for a version of Linux to boot.
Check out the Linux-m68k project for a list of 68k machines that can run Linux, however.
Apple distributes a free C++ compiler called MPW. Unfortunately, the interface is hard to figure out, documentation is scarce and the compiler is slow, but, hell, it's free. Get it off Apple's Dev-Tools website (I believe it's in the area of 18.6MB) It runs on my LC I, so I believe it would function decently on a Mac Classic..