Re: problem using self built DLL
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Fri, 20 Apr 2007 18:44:37 -0500
On 20 Apr 2007 15:22:31 -0700, wanwan <ericwan78@xxxxxxxxx> wrote:
so is it required to export the default constructer/destructer for the
client application to instantiate class objects?
All functions your DLL client calls must be exported. For member functions,
this happens automatically when you export the whole class. The compiler
will generate the default ctor, dtor, copy ctor, and assignment operator
per the language rules as needed, so if you want to keep them in your DLL,
you need to define and implement the ones you want clients to be able to
use. To prevent their use, you can declare them private but not define
them, which is the standard way to prevent the default functions from being
generated and to turn their use into compile or link-time errors.
--
Doug Harrison
Visual C++ MVP
.
- References:
- problem using self built DLL
- From: wanwan
- Re: problem using self built DLL
- From: Doug Harrison [MVP]
- Re: problem using self built DLL
- From: wanwan
- problem using self built DLL
- Prev by Date: Re: How the clear window name?
- Next by Date: Re: using floats as indices to a STL map?
- Previous by thread: Re: problem using self built DLL
- Next by thread: Re: problem using self built DLL
- Index(es):