The following code: int main(void) { std::string teste = "teste12"; std::cout << "Test string: " << teste << "(" << teste.size() << ")" << std::endl; } Produces: Test string: teste12() On QSDK, an OpenWRT 15.05 based linux maintained by Qualcomm. The same code compiles and runs well on Debian 9 and Mac OS 10.14+