[comp.windows.ms.programmer] C++ base classes in DLLs

pwt@otter.hpl.hp.com (Peter Toft) (05/01/91)

Thsis is a question about C++ and DLLs.

I'm attempting to write a class library using Borland C++ 2.0.  The classes
are for use under Windows, but they aren't window classes.  I would like
the implementation of the classes to live in a DLL, where they can be shared
by any applications that make use of them.

Is it possible to INHERIT from class whose implementation lives in a DLL?  Say
I have a class A whose implementation lives in a DLL, and I want to create an
application which defines a class B which is derived from A.  The B-specific
implementation is located in the application.

I have followed the instructions in the manual (User's guide pages 127-129) for
shared classes, but when compiling the application I get linkage errors to 
the effect that the linker cannot find any of the methods that it should find
in the DLL.  I AM linking in the import library for the DLL.  The symbols in
the import library and in the application object file seem to match.

I have not yet tried the case where there are shared classes, but no
inheritance from them.

I'm hoping that someone out there has tried this and can share their 
experience.

Thanks,
Peter

===============================================================================

Peter Toft,				ARPANET	pwt@hplb.hpl.hp.com
Hewlett-Packard Laboratories, 		JANET	pwt@lb.hp.co.uk
Filton Road,				UUCP	...!mcvax!ukc!hplb!pwt
Stoke Gifford,				CSNET	pwt%hplb.csnet@relay.cs.net
Bristol.				HPdesk	Peter TOFT / HPC600 / 05
BS12 6QZ.				Phone	UK (0272) 799910 ext 24245
United Kingdom.					Int'l +44 272 799910 ext 24245