You are missing main
definition in the program which is the starting point of any executable. So, linker is complaining because it didn't find the entry point ( which is main
) for the final executable.
Undefined symbols:
"_main",
Meaning there is no _main
in any of the source files compiled. ( i.e., int main(void)
, int main( int agrc, const char* argv[]
in C, C++ )
ld: symbol(s) not found
Meaning it is a linker error. Linker binds all the object files to a single executable. At this time it checks whether there is entry point at all for the executable. It isn't in your case, so it is complaining.