text: Hello,
  I have got a C++ template class and set in the *.i file this line:
  %include "myclass.hpp"
  %template(mymod) myns::mysubns::myclass<double>
  Within myclass.hpp I do this:
  #include <boost/ublas/matrix.hpp>
  namespace myns { namesapce mysubns {
  namespace ublas = boost::numeric::ublas
  };};
  On running the swig command I get the error "unkown namespace" on the
  namespace line. If I change it to
  #ifndef SWIG
  namespace ublas = boost::numeric::ublas
  #endif
  everything works fine and all target structurs will be create. Is there
  a problem
  with namespaces and swig? It seems the "short name" can not be resolved.
  Should I add a line for the boost include within my *.i file for
  resolving the namespace?
  I have setup some typemaps for the ublas structurs so imho swig can
  ignore the namespace
  line within the hpp file
  Thanks
  Phil
  On 28/03/12 10:18, Philipp Kraus wrote:
  > namespace myns { namesapce mysubns {
  >
  > namespace ublas = boost::numeric::ublas
  >
  > };};
  SWIG tries to work with missing type information and isn't as strict as
  a compiler, so often times you can get away with not providing it.
  However, you havn't got SWIG to parse the namespaces above, so you get a
  similar error as if you had just put the above into g++:
  example_wrap.cxx:222: error: ‘boost’ has not been declared
  example_wrap.cxx:222: error: ‘ublas’ is not a namespace-name
  example_wrap.cxx:222: error: expected namespace-name before ‘;’ token
  William