I've created an exampleClass with a .h file that includes:
- extern "C" {
- void app_main(void);
- }
- class exampleClass {
- public:
- void print();
- private:
- };
- #include "exampleClass.h"
- void exampleClass::print() {
- }
However, in my main when after I create an object of the class, I call the class method and get the error:
(.literal.app_main+0x20): undefined reference to `exampleClass::print()'
main/libmain.a(main.cpp.obj): In function `app_main':
C:...\Project\build/../main/custom_accData.cpp:53: undefined reference to `exampleClass::print()'
Does anyone know why this is failing? Thanks for any help.