Not all objects can be constructed, for example anything pure virtual
Swig attempts to detect which objects can and cant be constructed.  Sometimes it gets it wrong
One way in which it gets wrong are where you instantiate a method in a derived class that was pure virtual in the base class.  If the method parameters are not textually identical, Swig gets confused.  For example if one has VOP::sometype, and the other has sometype, swig considers this as too differentypes.   Since swig considers the derived class can no longer be constructed, you get the error below.

Theres an option on the commandline to change behavior for creatoin of constructors, but you're probably better off diagnosing why the constructor is not being created.

Note that this issue is a PAIN IN THE BUTT to diagnose.  You might consider rebuilding swig from scratch and getting it to pump out rather more debugging information than it does.  Otherwise look forward to a good half hour or more of instantiating all your methods (replacing = 0 with {} ) and stuff...

Hugh

On 9/28/05, Reed Hedges <[EMAIL PROTECTED]> wrote:

Hello, after about a week hiatus, I returned to a little bit of work I
was doing with Python.  All of a sudden the SWIG wrapper won't work for
me and I don't know why.  I may have done something to break it (I have
made a few changes to vos_swig.i etc.) but I can't figure out what. I
just updated VOS from CVS (excepting my local changes to SWIG of course).

Every proxy class in Python that Swig generates now has the following in
its __init__ definition:

def __init__(self): raise RuntimeError, "No constructor defined"

WTF?  This makes it impossible to create any Python objects!

Help!

Any ideas?

Reed



_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to