SWIG std::string& passing

jchiang at slac.stanford.edu jchiang at slac.stanford.edu
Sun May 29 11:06:25 EDT 2005


Add the line

%include stl.i

to your .i file.  This will make other stl containers available, in
addition to string. Make sure you put this line before any include
directives for classes that use std::string.  SWIG requires classes to
be declared before they are used in order for the interfaces to be
exposed completely.




More information about the Python-list mailing list