Dear all,

I have a plugin system in my app based on interfaces (classes with only
pure virtual functions). The app is compiled with mingw-w64 4.9.2 and works
well with plugin dlls compiled with the same compiler.

Now I am trying to support MSVC compiled plugins.

This works partially : the app can call the methods from interface objects
provided by the DLL. However, if I pass a pointer on an interface class to
one of the DLL methods, it does a segmentation fault.

After debugging, I have seen this:

*A is a pointer to an object deriving from InterfaceA , and created by the
app.
*B is a pointer to an object deriving from InterfaceB, and created by the
dll

>From the app, I call B->someMethod(A);
and someMethod calls A->someOtherMethod()

When I debug inside someOtherMethod (which is an app side method), "this"
should point on *A, but it points on *B. Which causes the segmentation
fault afterwards.

Can this be an ABI issue?

Thanks!
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to