-o specifies the name of the output file. But if you only compile without linking which -c requests, each source file creates its own output file. So which of those files should the compiler name as specified with -o? Solution: it is not legal and the compiler refuses to work.

If you want to rename each object file, add a line in your build-script or use e.g. mmv.

Email codedump link for Why can&#39;t you use the -o flag with the -c flag in GCC?