v3xX:
at the end of MyConstantClass.h
That's where you DECLARE it, but you never DEFINE it. See: What is the difference between a definition and a declaration in C++?
Also, you need to tell the compiler that your class's methods won't modify the internal state of the class:
#ifndef H_CONSTANTCLASS
#define H_CONSTANTCLASS
#include <Arduino.h>
class MyConstantClass {
public:
const byte CONT = 'b';
void println(const char* msg) const {
Serial.print("OK here: "); Serial.println(msg);
}
void println() const {
Serial.print("Test: "); Serial.println(CONT);
}
};
extern const MyConstantClass MCC;
#endif