Why am I getting “undefined reference to main”
Your compiler’s command line contains -I -c sequence. This -I option “swallows” your -c option. -I requires an additional argument, which is an include directory name. You failed to supply that argument, which is why -I assumes that -c that follows it is the directory name. So that -I consumes that -c. The compiler never sees that -c. Without -c it assumes that you want to compile and link your program. Since Gladius.cpp does not have main in it, … Read more