Re: Problem with reading an int with operator>>

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Stephen Howe wrote:

Stephen:

Thanks for the reply. But what is the C++ RTL?


It is cin cout, cerr, wcin, ostream, istream, fstream, ostringstream,
istringstream, streambuf, locale, facets etc, member functions etc. You can
see all the exports by opening MSVCP60.DLL with DEPENDS.EXE
2104 exported functions.

Bear in mind that VC6.0 comes with 2 C++ libraries: a legacy C++ library
(Microsofts) and new C++ library closer to ISO C++ standard (Dinkumware's).
The former uses .H include files, the latter uses extensionless include
files. Don't mix the 2 C++ libraries :-)

For VC++ 6.0 you have

Single-threaded
==========
LIBC.LIB - single-threaded standalone C library, release
LIBP.LIB - single-threaded standalone C++ library (new),
release
LIBI.LIB - single-threaded standalone C++ library
(legacy), release

LIBCD.LIB - single-threaded C library, debug
LIBPD.LIB - single-threaded standalone C++ library (new),
debug
LIBID.LIB - single-threaded standalone C++ library
(legacy), debug

Compile options /ML and /MLd select these

Multi-threaded
==========
LIBCMT.LIB - multi-threaded standalone C library, release
LIBPMT.LIB - multi-threaded standalone C++ library (new),
release
LIBIMT.LIB - multi-threaded standalone C++ library
(legacy), release

LIBCMTD.LIB - multi-threaded C library, debug
LIBPMTD.LIB - multi-threaded standalone C++ library (new),
debug
LIBIMTD.LIB - multi-threaded standalone C++ library
(legacy), debug

Compile options /MT and /MTd select these

Multi-threaded in DLL form (no single-threaded exists)
=====================================
MSVCRT.LIB - multi-threaded export stubs for C library as
DLL, release
MSVCPRT.LIB - multi-threaded export stubs for C++ library
(new) as DLL, release
MSVCIRT.LIB - multi-threaded export stubs for C++ library
(legacy) as DLL, release

MSVCRTD.LIB - multi-threaded export stubs for C library as
DLL, debug
MSVCPRTD.LIB - multi-threaded export stubs for C++ library
(new) as DLL, debug
MSVCIRTD.LIB - multi-threaded export stubs for C++ library
(legacy) as DLL, debug

For these above, the corresponding RTL DLLs are

MSVCRT.DLL - multi-threaded C RTL in DLL form, release
MSVCP60.DLL - multi-threaded C++ RTL in DLL form (new), release
MSVCIRT.DLL - multi-threaded C++ RTL in DLL form (legacy), release

MSVCRTD.DLL - multi-threaded C RTL in DLL form, debug
MSVCP60D.DLL - multi-threaded C++ RTL in DLL form (new), debug
MSVCIRTD.DLL - multi-threaded C++ RTL in DLL form (legacy), debug

Compile options /MD and /MDd select these


And why does std::string
have to be compiled into it?


Must be your compiler options. They are not set right for some modules.
Somewhere you are compiling with /MD or /MDd set
If you consistently compile with /ML or /MT (and debug versions) for all
modules, you should not have any dependencies on MSVCP60.DLL.

Notes for V Studio 2001 and greater, the legacy C++ libraries have been
removed as an option.

Stephen Howe


Stephen:

Thanks again. Actually, I do not have any problems, because I always static link (MT).

I had somehow thought that the whole of the standard library was in header files. but I guess it isn't, and that if I do dynamic linking and use any part of the (new) standard library, then I will need to link to MSVCP60.DLL.

But I still do not understand why std::string, which IS completely implemented in header files, is compiled into MSVCP60.DLL. It just seems to cause a lot of trouble. Again, I use static linking, so it doesn't bother me.

<aside>
When I first tried dynamic linking years ago, I was using the old iostream library, so it was MSVCIRT.DLL that I needed. That is why I thought that the need for MSVCP60.DLL was caused by starting to use std::string. I forgot that I switched to the new libraries and so needed it anyway (if I wanted to dynamic link).
</aside>

David Wilkinson


.



Relevant Pages

  • Re: Problem with reading an int with operator>>
    ... (legacy), release ... , debug ... Compile options /ML and /MLd select these ... Multi-threaded in DLL form ...
    (microsoft.public.vc.stl)
  • Re: How to connect to children process
    ... Main problem is amount of manual operations required per debug cycle. ... connection to DLL with debugger takes sensible amount of time and manual ... Is the main problem that the debugger keeps symbols file loaded ... AFAIK that's how VS2003 debugger works, but WinDbg should usually ...
    (microsoft.public.vsnet.debugging)
  • Re: running a service/driver/application upon startup
    ... Would it be possible for you to drop a debug services.exe and debug nk.exe ... > I ran dumpbin/exports on the finger dll and saw the required function ... >> theories as to why it's not getting loaded but just doing 'services load ...
    (microsoft.public.windowsce.embedded)
  • Re: technical/OS problem (windows xp?)
    ... Build a debug version of the ISAPI DLL. ... Create a virtual root with execute permissions in the IIS Management ... Add your ISAPI extension or filter DLL to the list. ...
    (alt.marketing.online.ebay)
  • Pthread debug DLL uses non-debug VC runtime; include its manifest to resolve this
    ... where I could not start up a debug version of a console app. ... the pthreads DLL, from other comments in the thread. ... Dependency Walker revealed that the Pthreads debug ... It turns out that you need not only the .dll files, but the .manifest files as well. ...
    (microsoft.public.vsnet.debugging)