I have a frustrating problem which got me spend a lot of time dealing with it but I did not find any solution.
I want to use C++ class in PHP with SWIG. I generated
You need to have:
%include <std_string.i>
Early enough in the SWIG interface (i.e. before std::string is first seen).
std::string