I would like to wrap a C++ function with SWIG which accepts a vector of STL strings as an input argument:
#include
#include
#
You need to tell SWIG that you want a vector string typemap. It does not magically guess all the different vector types that can exist.
This is at the link provided by Schollii:
//To wrap with SWIG, you might write the following:
%module example
%{
#include "example.h"
%}
%include "std_vector.i"
%include "std_string.i"
// Instantiate templates used by example
namespace std {
%template(IntVector) vector;
%template(DoubleVector) vector;
%template(StringVector) vector;
%template(ConstCharVector) vector;
}
// Include the header file with above prototypes
%include "example.h"