I’m completely new to SWIG and trying to wrap C++ into C#.
One of my classes uses std::ostream. However, all my attempts to include swig’s “std_iostream.i” result in needing to suppress an error and swig hitting a syntax error “std_basic_string.i” file, even if I have nothing else in my own interface file.
The line in question is “%traits_swigtype(_CharT);” and is in a swig library file, included by “std_iostream.i”
Is anyone familiar with what is going wrong?
Additionally, can anyone explain how exactly one uses “std_iostream.i”, beyond just including it?
/* File : MyClass.i */
C:\workspace\Release\include>swig -c++ -csharp -I"C:\Program Files (x86)\swigwin-3.0.2\Lib\std" -cpperraswarn myclass.i
C:\Program Files (x86)\swigwin-3.0.2\Lib\std\std_except.i(2) : Warning 205: CPP
#error ""do not use this version of std_except.i"".
C:\Program Files (x86)\swigwin-3.0.2\Lib\std\std_basic_string.i(44) : Error: Syntax error in input(3).