MSVC and pure abstract classes

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Apr 19 06:30:56 CEST 2007


Andreas Pakulat schrieb:
> Hi,
> 
> in KDevelop4 we have a couple of pure abstract classes, which only have
> a header file and use an inline destructor to make it virtual. All
> functions are pure virtuals. When using those classes linking fails with
> MSVC (works with mingw and gcc) complaining about missing references to
> the constructor and destructor of the abstract class. The simple
> workaround I found is adding a .cpp file along the .h and add it to the
> library (or create a library if there doesn't exist one yet). 
> 
> The question is: Is there another solution for this?
> 
No - when you export a class there is no other way.

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/kde-windows/attachments/20070419/6caf892f/attachment.pgp 


More information about the Kde-windows mailing list