Re: creating a c++ dll
From: Arnaud Debaene (adebaene_at_club-internet.fr)
Date: 03/23/04
- Next message: Marius Prisecaru: "Re: How to put a dialog function into class?"
- Previous message: Andy Coates: "Re: C1001 ICE with .NET 2003 compiling templates"
- In reply to: Doug Harrison [MVP]: "Re: creating a c++ dll"
- Next in thread: William DePalo [MVP VC++]: "Re: creating a c++ dll"
- Reply: William DePalo [MVP VC++]: "Re: creating a c++ dll"
- Reply: Doug Harrison [MVP]: "Re: creating a c++ dll"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Mar 2004 19:25:16 +0100
Doug Harrison [MVP] wrote:
> Arnaud Debaene wrote:
>
>> Sure. I was referring to the many apps that are splitted among
>> several private DLLs which are used only by this app. I don't see
>> the usefullness of such a design.
>
> Possible benefits include:
>
> Faster linking.
Right.
> Reuse by other related apps and DLLs, perhaps ones distributed in
> different packages or used internally by the organization that wrote
> them.
Why not, but if the DLL has been designed for the app, it often is too
specialized for reuse.
> Finer control of names visible to other entities which link to them.
namespaces and PIMPL idiom are better alternatives.
> Ability (albeit limited and imperfect) to control order of
> initialization of static duration objects (globals and class statics)
> such as mutexes in the sense that a DLL X that implicitly links to
> DLL Y can be assured Y's globals are initialized before X's. This
> would not be the case if X and Y were static libraries.
Hum... I wouldn't rely on this in production code, that's too unmaintenable
and implicit...
>> but I feel DLLs are often misused in other cases when they make the
>> programmer life more complicated (CRT versions' mismatch ...)
>> without any real benefit.
>
> If you view C++ DLLs which tightly integrate with other modules as
> equivalent to static libraries WRT compiler and CRT versioning
> issues, then those concerns go away.
WRT ?????
Don't forget the overhead (ableit minimal) of cross-modules calls. There may
also be a concern with app startup time (if using static libraries, you win
at startup time what you've loose at link time).
Arnaud
MVP - VC
- Next message: Marius Prisecaru: "Re: How to put a dialog function into class?"
- Previous message: Andy Coates: "Re: C1001 ICE with .NET 2003 compiling templates"
- In reply to: Doug Harrison [MVP]: "Re: creating a c++ dll"
- Next in thread: William DePalo [MVP VC++]: "Re: creating a c++ dll"
- Reply: William DePalo [MVP VC++]: "Re: creating a c++ dll"
- Reply: Doug Harrison [MVP]: "Re: creating a c++ dll"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|