Callback virtual function from C++ to Go / Swig

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Callback virtual function from C++ to Go / Swig

Larry Bisel
I am trying to use SWIG to interface some Go code to a library that is written in C++.  The C++ library has a virtual callback function in a class:

class AbstractClass {
public:
    virtual ~AbstractClass() {};
    virtual void AbstractCallback(Arg *arg) {}
}

I am using Go 1.7.4 and SWIG 3.0.10.  I want the C++ library to make a callback to my Go code.  I have tried to model my code after the example in Section 23.4.7 in the SWIG-3.0 Documentation, but I have not been able to get this to work.  I think my code is crashing the C++ library when the C++ library tries to make the callback, but I'm not exactly sure about that.  Do you have any additional pointers or ideas on how to debug this?

Thanks,

Larry



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user