Archived

This topic is now archived and is closed to further replies.

Psybr

DLLs and Inheritance

Recommended Posts

Say you have two classes, CBaseClass and a derived class CDerivedClass. I want to export CDerivedClass into a DLL, but I''m not sure if I have to include CBaseClass in the DLL, or define it in the application, or what?

Share this post


Link to post
Share on other sites
So if I had two classes derive from the base class, would it be easier to rewrite the derived classes without inheritance, or to include the base class in a DLL? And how would I reference it in the DLLs of the derived classes?

Share this post


Link to post
Share on other sites
Two ways I can think of:

CBaseClass.lib
CDerivedClass1.dll links with CBaseClass.lib
CDerivedClass2.dll links with CBaseClass.lib

or

CBaseClass.dll
CDerivedClass1.dll links with CBaseClass.lib (import lib)
CDerivedClass2.dll links with CBaseClass.lib (import lib)




Kami no Itte ga ore ni zettai naru!

Share this post


Link to post
Share on other sites