Question: what is undefined reference error?
Answer: An “Undefined Reference” error occurs when we have a reference to object name (class, function, variable, etc.) ... Thus when the linker cannot find the definition of a linked object, it issues an “undefined reference” error. As clear from definition, this error occurs in the later stages of the linking process.