From: Kliment M. <km...@ya...> - 2008-10-24 22:12:14
|
Here is my test .i file:-------------------------------------- %module Workbench %{ #include <string> %} %include "typemaps.i" %include "cpointer.i" %include "std_string.i" %include "stl.i" %inline %{ template<class T> class TestStr { public: T *Member; }; void Testing(TestStr<char>& s) { s.Member = "This is a testing string"; } void Testing2(std::basic_string<char>& s) { s = "This is a testing string"; } %} %template(TestString) TestStr<char>; %template(NxString) std::basic_string<char>; -------------------------------------- While running swig I get the following message: temp.i(23): Error: Template 'basic_string' undefined. And the Java proxy classes generated have the unrecognized type pointer SWIGTYPE_p_std__basic_stringT_char_t However TestString proxy is generated beautifully. It looks like I am missing some simple declaration or an include somewhere in the beginning.... please help. Regards Kliment |