I want to provide a string constant in an API like so:
extern const char* const SOME_CONSTANT;
But if I define it in my static library sour
The problem could be that the extern declaration is not visible in the source file defining the constant. Try repeating the declaration above the definition, like this:
extern const char* const SOME_CONSTANT; //make sure name has external linkage
const char* const SOME_CONSTANT = "test"; //define the constant