I'm using toStringz() and it works fine if you're c++ function parms are const ref or by value: void funk(const std::string& val) {} void funk(std::string val) {}