const char*, extern const char*, My Custom Library

Why don’t you just create a member function to pass the string into the class?

void MyClass::setClientId(const char* clientId = nullptr)
{_clientId = clientId;}


void MyClass::someFunction()
{
  if (_clientId)
  {
  ...

It wouldn’t make the call to setClientId() compulsory.