21 Nov 00:17
nested class workaround problem
From: Patrick M. <meierpatrick <at> ymail.com>
Subject: nested class workaround problem
Newsgroups: gmane.comp.programming.swig
Date: 2008-11-20 23:20:34 GMT
Subject: nested class workaround problem
Newsgroups: gmane.comp.programming.swig
Date: 2008-11-20 23:20:34 GMT
Hello, I tried the workaround for nested classes at http://www.swig.org/Doc1.3/SWIGDocumentation.html#SWIGPlus_nested_classes (section 6.26, not exactly the example, see below), but I get the following error when compiling the swig-generated test_wrap.cxx: test_wrap.cxx: In function ‘PyObject* _wrap_Test_inner(PyObject*, PyObject*)’: test_wrap.cxx:2777: error: no matching function for call to ‘ns::Test::Inner::Inner()’ In my case the Inner class has no default constructor, but I thought swig would recognize it and generate code that doesn't try to call Inner() without arguments. How can I fix the problem? I attach header and implementation test.h and test.cxx and the interface file test.i: --- test.h --- namespace ns{ class Test{ public: class Inner{ public: Inner(int arg); }; private: Inner inner_; public:(Continue reading)
RSS Feed