This is one of the quirks that people face, it is just a question that you have defined the header file ah, which declares a const array of 123 characters and assigns it an external reference. When it is included in the b.cpp file, you basically promise the compiler that it will find in some other translation unit.
But each const variable has a dark secret - it falls inside its defining translation unit, because it is implicitly defined by a static connection. You promised that your compiler whatever will be divided into several units of translation, but in fact it is loyal to only one unit of translation and does not like to share. And, well, you know everything else.
Decide by explicitly specifying extern in the implementation file.
user1309389
source share