Re: Problem with reading an int with operator>>
- From: "P.J. Plauger" <pjp@xxxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 05:52:42 -0500
"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote in message
news:%23%23EdNpoRGHA.5900@xxxxxxxxxxxxxxxxxxxxxxx
P.J. Plauger wrote:
[snip]
I'm not sure that you can statically link at all these days. The only
trick I can think of, which is pretty unpalatable, is to make a
stream that doesn't look like istream<char, char_traits<char> >,
probably by writing your own traits class. That would outsmart
the prebuilt facets in the DLL. But that may well lead to other
surprises.
PJ:
I don't think it's true that you can no longer static link in VC8. I think
it is just (even) more discouraged than before because you cannot static
link if you're using /clr.
Could be. I cloud over when the subject of DLLs comes up, and defer
to people like Pete Becker whenever possible.
One of the many things I like about static linking is that I can patch
the standard library myself (this is important in VC6, where the patches
never made it into the service packs).
I absolutely agree, and prefer static linking in most contexts.
But I have a question. What exactly is compiled into msvcp60.dll (and
corresponding VC7/8 versions)? Is it just std::string and std::wstring?
Grep the headers for all the DLL magic. You can see the classes that
are explicitly instantiated into the DLL.
And what exactly is the purpose of it? Is it just so these objects can be
passed across DLL boundaries?
Well, it does save link time and code size in .exe files.
Personally, I would be prepared to forgo
this advantage if I could keep all my Standard Library in the headers
where it could be easily updated. Is it possible to do this even if one is
dynamically linking CRT (and MFC)?
Dunno. I'd like to think so.
It seems to me that the existence of msvcp60.dll (and VC7/8 versions) is
an impediment to Microsoft updating the standard library when improvements
have been found. Or am I missing something here?
I think Microsoft takes a more comprehensive view of updating the
library, since they can provide new versions of headers, DLLs, and
all in one SP.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
.
- Follow-Ups:
- Re: Problem with reading an int with operator>>
- From: David Wilkinson
- Re: Problem with reading an int with operator>>
- References:
- Re: Problem with reading an int with operator>>
- From: P.J. Plauger
- Re: Problem with reading an int with operator>>
- From: P.J. Plauger
- Re: Problem with reading an int with operator>>
- From: David Wilkinson
- Re: Problem with reading an int with operator>>
- Prev by Date: Re: Problem with reading an int with operator>>
- Next by Date: Re: Problem with reading an int with operator>>
- Previous by thread: Re: Problem with reading an int with operator>>
- Next by thread: Re: Problem with reading an int with operator>>
- Index(es):
Relevant Pages
|
Loading