Compiling a sample xxx.cc file using 'c++' command compiles fine whereas 'gcc' command outputs errors. A whole bunch of 'undefined reference to's. Am i wrong to assume that 'gcc' command would use the file extension and call the appropriate compiler.