I have one header file where I am declaring variables like below :
//Constants.h
const std::string& binaryName = "ApplicationGateway";
const std::string& binaryMode = "Maintenance";
However when i include this file in multiple cpp files say first.cpp and second.cpp i get multiple definition error and i could not find the reasoning for same because my understanding is const variable have internal linkage.
So my question is does const reference don't have internal linkage and if not how we can have const reference in header file that need to be included in multiple cpp files.