[C++-sig] Re: MSVC and exposing virtual member functions

David Abrahams dave at boost-consulting.com
Wed Apr 21 17:29:45 CEST 2004


Xavier <xavier at noreality.net> writes:

> I pretty much copied the code from the tutorial. Could the part I
    ^^^^^^^^^^^
Why not an exact copy?
> commented out during the boost compile be causing this error?
>
> On a slightly unrelated note, I downloaded the MSVC 2003 Toolkit from
> MS with the 7.1 compiler - Can I just copy the files in there over the
> top of my VC6 files, or do I need to do any extra setup?
>
> Also, as a MSVC project, should I be compiling this sort of thing as a DLL?
>
> - Xavier
> #include <boost/python.hpp>
> using namespace boost::python;
>
> class Base {
> public:
> 	virtual int f() = 0;
> };
>
> int call_f(Base& b) { return b.f(); }
>
> class BaseWrap : Base
  ^^^^^-----------^-------- inheritance is private.
  
The tutorial uses "struct", which implies public inheritance by default.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list