[C++-sig] ‘Base’ is an inaccessible base of ‘Derived’ ??

Stefan Seefeld seefeld at sympatico.ca
Sun Mar 14 21:49:52 CET 2010

On 03/14/2010 04:28 PM, Anders Wallin wrote:
> Hi all,
> I'm trying to expose a base-class with pure virtual functions, and a
> derived class. Following the example here:
> http://www.boost.org/doc/libs/1_42_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions
> both in my real code, and in a minimal test-case, I get a long list of
> errors which ends with:
> /usr/include/boost/python/object/inheritance.hpp:99: error: ‘Base’ is
> an inaccessible base of ‘Derived’
> my minimal test-case is here:
> http://pastebin.ca/1839949
> This is on stock-standard Ubuntu, i.e. boost 1.38.0, g++ 4,4,1, and python 2.6.4
> any ideas what is going on? is there working code for the
> tutorial-documentation somewhere?

The minor but very significant difference between the tutorial code and 
yours is that the tutorial uses 'struct', while you are using 'class'. 
The effect is that in your case, all base classes are private, making 
them, as the compiler says, "inaccessible".



       ...ich hab' noch einen Koffer in Berlin...

More information about the Cplusplus-sig mailing list