🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2406

C++ base classes in DLLs (BC++)

#2406
From: Peter Toft
Date: Wed, 01 May 1991 12:24
36 lines
1980 bytes
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
Technical Details
Message-ID: <72170010@otter.hpl.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!pwt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!pwt
From: pwt@otter.hpl.hp.com (Peter Toft)
Newsgroups: comp.windows.ms.programmer
Subject: C++ base classes in DLLs (BC++)
Message-ID: <72170010@otter.hpl.hp.com>
Date: 1 May 91 12:24:59 GMT
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 36