For some reason, I would like to use an extension
g++ -o abc.oxy abc.cxy
g++: warning: conn.cxy: linker input file unused because linking not done
g++ -o abc.oxy abc.cxx
.c, .cpp, .cxx
g++ -o abc.oxy -x c++ abc.cxy
g++ can't deduce the correct language from your custom suffix, and anything that it can't deduce as source, it passes directly to the linker as an object file.
Am I not allowed to use extension other than
.c, .cpp, .cxx?
Not if you want GCC to auto deduce the source language. Conventions are in place so we won't have to be explicit, but you can still use the