whichkey = keypad.getKey();from other modules. I get this error compiling with a CMake make file :- undefined reference to `Keypad::Keypad(char*, unsigned char*, unsigned char*, unsigned char, unsigned char, unsigned char)'.There are many more like this all referring to class definitions.How to do please?

Rather people think you to be a fool than you open your mouth and confirm it.

If the code shown in the top window is placed inside a class, you will need to refer to the members of that class (keypad, etc.) using an instance of that class. key = keypad.getKey(); will not work, because keypad is a member variable.