You need to add %include <std_string.i>
to your SWIG module. Otherwise, it does not know how to map a Lua string
to an C++ std::string
.
%module example
%include "std_string.i"
%apply const std::string& {std::string* foo};
struct my_struct
{
std::string foo;
};
Judge Maygarden
2010-09-22 18:47:27