[C++-sig] Cross-module inheritance

Eric Jardim ericjardim at gmail.com
Mon Aug 22 03:37:04 CEST 2005


2005/8/21, David Abrahams <dave at boost-consulting.com>:
> 
> It certainly does work; you just have to follow some rules when you
> build your extensions to make sure their RTTI info is properly shared.


Fine. Is there any example/docs of it?

That was for Boost.Python v1. You are (I hope) using the improved
> Boost.Python v2


Sure, I am using the newest (v2 1.33) :)

This is the brute-force method. A more delicate and portable approach
> is to stick the common base class in a shared library that is linked
> to by all the extension modules that derive from it.


I imagined that. But how should I do this? This base class is now on a 
shared library. You mean that the wrapper class (QObject_Wrapper) or the 
exposed class(class_<QObject_Wrapper>("Qobject")) should be in a separed 
shared library?

Anyway, Python modules are shared librarys anyway. But I think they don't 
see each other (modules).

No, the Windows dynamic linking system is different. However, the
> approach I suggested above works fine.


Hmm, good. I really need someone to test things for me on Windows. I don't 
have a copy of it, besides it is "wild territory" for me.

> 4 - Should I give up everything? ( hope not ;)
> It's a little early for that yet.
> 

Ok, let's get back to work :)

[Eric Jardim]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050821/2fe5a60f/attachment.htm>


More information about the Cplusplus-sig mailing list