Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

msvcp60.dll

0 views
Skip to first unread message

Dave Webber

unread,
Dec 31, 1999, 3:00:00 AM12/31/99
to
Just an idly curious question. But, in a break with tradition, first an
answer:

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

akl...@my-deja.com

unread,
Jan 5, 2000, 3:00:00 AM1/5/00
to
msvcp60.dll is the Microsoft Visual C++ 6.0 runtime library. You need
it if you use any C++ Standard Library features: STL, ios, etc.

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.

Dave Webber

unread,
Jan 6, 2000, 3:00:00 AM1/6/00
to

akl...@my-deja.com wrote in message <8502qq$931$1...@nnrp1.deja.com>...

>msvcp60.dll is the Microsoft Visual C++ 6.0 runtime library. You need
>it if you use any C++ Standard Library features: STL, ios, etc.


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.

Dave Webber

unread,
Jan 7, 2000, 3:00:00 AM1/7/00
to
In retrospect most of the STL is template classes and they're all in header
files of course. So it will only be when something other than the template
class itself is involved that msvcp60.dll will be needed.
0 new messages