• Advertisement

Archived

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

DLLs and Inheritance

This topic is 5687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
You''ll have to either include CBaseClass in the same DLL
or export to another DLL and have CDerivedClass''s DLL
reference it.



Kami no Itte ga ore ni zettai naru!

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

  • Advertisement