Edward Diener <eldlistmaili...@tropicsoft.com> writes: >> Calling a virtual member requires an access to the vtable of the class. >> The vtable is defined on the dll that contains the class' code. If the >> class is not exported, the vtable is not exported. The errors you are >> seeing is the linker complaining about the missing vtable. > > So you are saying that any class with virtual functions must have the > class itself exported rather than the individual member functions when > using gcc ? Because with VC++ that is not the case, so it must be an > issue with gcc on Windows.
Not sure what VC++ does, exactly, but this: https://msdn.microsoft.com/en-us/library/81h27t8c.aspx /quote If you export one virtual function in a class, you must export all of them, or at least provide versions that the client can use directly. If you have a class in which you are using selective member import/export with virtual functions, the functions must be in the exportable interface or defined inline (visible to the client). /end quote seems to say that you can't export some selected virtual members defined in .cpp files and hide the rest of the class. ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public