I got a shock recently when a module suddenly started to need msvcp60.dll -
a library which I hadn't been aware of.
It turns out it is one of the standard distributable libraries with VC++ 6.0
and the reason I needed it was that I was calling std::vector::at(). This
is one of the few routines in the C++ template library which throws
exceptions, and the exceptions mean it needs msvcp60.dll
(I've been using std::vector for years but purely by coincidence this was
the first time I used the at() method. I got a shock when I tried to run
my program on a machine without VC++ installed - where msvcp60.dll was
absent.)
Now the question:
Has anyone else found that they need msvcp60.dll and if so what for?
Happy New Year
Dave
Dave Webber
Author of MOZART the Music Processor for Windows - http://www.mozart.co.uk
Member of the North Cheshire Concert Band http://members.aol.com/northchesh
For example, it is required for anything that throws the C++
class "exception" or any of its derived classes (logic_error,
runtime_error, etc.), either directly or indirectly. An example is the
<string> class, which can throw bad_length.
The VC6 license allows you to redistribute msvcp60.dll with your
application. Be sure to also redistribute msvcrt.dll as they are
tightly integrated.
As a workaround you can link using the static C library, which will
link msvcp60 statically also. Expect your code to bloat hugely,
however.
I hacked the C++ header files (<string>, <exception>, <stdexcept>) to
point to my own internal exception classes. Thus I avoided linking
msvcp60.dll. As msvcrt.dll is always included with NT/9x I don't need
to redistribute anything, and my apps are nice and small.
-Alan Klietz
al...@NOSPAM.algintech.com
In article <946653734.1356.1...@news.demon.co.uk>,
Sent via Deja.com http://www.deja.com/
Before you buy.
Well that's the odd thing - you can do quite a bit without it - eg with the
vector template class and with streams.
>For example, it is required for anything that throws the C++
>class "exception" or any of its derived classes (logic_error,
>runtime_error, etc.), either directly or indirectly. An example is the
><string> class, which can throw bad_length.
Yes I found I needed it when I used vector::at() - but only because it
throws an exceptio. Very few vector member throw exceptions and for those
you don't need the library.
>The VC6 license allows you to redistribute msvcp60.dll with your
>application. Be sure to also redistribute msvcrt.dll as they are
>tightly integrated.
Yes - I've been distributing msvcrt.dll for years.
>I hacked the C++ header files (<string>, <exception>, <stdexcept>) to
>point to my own internal exception classes. Thus I avoided linking
>msvcp60.dll. As msvcrt.dll is always included with NT/9x I don't need
>to redistribute anything, and my apps are nice and small.
I still install msvcrt.dll with proper version checking - as you never know
who has what!
I was just rather surprised that only some of the C++ library is actually in
msvcp60.dll and that I've got by without needing it for years. Actually
having replacd calls to vector::at() with calls to vector::operator [ ] I
find I still don't need it. Dare say it won't last though.