Patrick M. | 21 Nov 09:38

Re: nested class workaround problem


Josh Cherry wrote:
> 
> I presume it's unintentional that you %include test.h twice.  I suspect 
> that the first %include is causing the problem.
> 

Correct. That was unintentional. I removed the first %include "test.h"
(right after %module test;), but the error remains the same.

I'd appreciate if somebody tried to compile this example (with the small
%include "test.h" correction) and suggests what is going wrong, or if the
problem is not reproducable.

For compilation, just put test.h, test.cxx and test.i in one directory and
run

$ swig -c++ -python test.i
>test.h:7: Warning(312): Nested class not currently supported (ignored).
$ g++ -c `python-config --includes` test_wrap.cxx
>test_wrap.cxx: In function ‘PyObject* _wrap_Test_inner(PyObject*,
PyObject*)’:
>test_wrap.cxx:2796: error: no matching function for call to
‘ns::Test::Inner::Inner()’
>test.h:6: note: candidates are: ns::Test::Inner::Inner(int)
>test.h:4: note:                 ns::Test::Inner::Inner(const
ns::Test::Inner&)

(I don't care about the nested class warning by swig, but I'm really hoping
to find a solution to the error
(Continue reading)


Gmane