Re: Static Dll vs Shared Dll
- From: "KMA" <KMA@xxxxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 07:56:48 +0200
> A belief that copy==install is obsolete, has been obsolete for 15 years,
and should not be
> used as justification for poor programming practice.
Joe,
I respect (and enjoy) about 99% of what you write, but I take issue with the
above. I interpret what you've written to mean that single exe programs with
no dependency on non-Windows dlls are somehow "old hat". Such a program
*can* be distributed simply by copying the exe and runing it, and I see
absolutely nothing wrong with that and plenty that's right. No dll
mismatches, no complicated registry keys, no messy uninstall (or rather
half-uninstall). To me that represents good programming practice. And the
cost is what? Larger exe? surely you're not campaigning on this point.
Inability to update a component DLL without reinstalling a new exe? Please
explain.
I look forward to an informative and entertaining reply. Unless I've
misinterpreted what you meant.
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:8useb1h9ip0kmia4kjqjnaon1gsctrm2lf@xxxxxxxxxx
> There is no such thing as a "static DLL"; there is only a "static link",
in which all the
> code is copied into your executable image.
>
> What link error do you get. All you've said is "my program doesn't work,
what did I do
> wrong?", which isn't very much help in diagnosing your problem.
>
> As far as I have been able to tell in a decade of MFC programming is that
static is never
> "better" than shared; I have not once delivered a statically-linked MFC
project. One
> client decided they wanted a static link, and theproblems they experienced
were what I
> could have predicted.
>
> A belief that copy==install is obsolete, has been obsolete for 15 years,
and should not be
> used as justification for poor programming practice. Use an installer
program. As much as
> I despise InstallShield, it does come with VS, at least VS6.
> joe
>
> On Mon, 20 Jun 2005 11:39:28 +0100, "Simon" <spambucket@xxxxxxxxxxx>
wrote:
>
> >Hi,
> >
> >In the past I have always used Static link in the belief that whenever I
> >created an exe I did not have to check that the user had anything
installed
> >on their computer, (any special dll that are on my machine but might not
be
> >on anybody else).
> >
> >It made the exe itself a lot bigger but it never really was a problem as
my
> >data files takes 99.9% of the size anyway.
> >
> >But now I created a new project, (for something totally different), and I
> >get link errors when building statically, (but not when I link shared).
> >I have 2 projects, one lib and the other is an exe, as usual I selected
"Use
> >MFC in a static link".
> >
> >So, why is static better than shared? Is it really better? How can I
prevent
> >those link errors?
> >Ideally I don't want to have to worry about what is/is not installed on
the
> >users machine.
> >What do I need to ship with my Shared Dll to get it to work on all
machines,
> >any possible licence problems?
> >
> >Simon
> >
>
> Joseph M. Newcomer [MVP]
> email: newcomer@xxxxxxxxxxxx
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Static Dll vs Shared Dll
- From: Joseph M . Newcomer
- Re: Static Dll vs Shared Dll
- References:
- Static Dll vs Shared Dll
- From: Simon
- Re: Static Dll vs Shared Dll
- From: Joseph M . Newcomer
- Static Dll vs Shared Dll
- Prev by Date: Re: How to operate the ListCtl in a worker thread.
- Next by Date: Registration of ActiveX Controls
- Previous by thread: Re: Static Dll vs Shared Dll
- Next by thread: Re: Static Dll vs Shared Dll
- Index(es):
Relevant Pages
|
Loading