Microsoft KB Archive/200495

= FIX: Cannot Create bad_typeid Object with /MD =

Article ID: 200495

Article Last Modified on 11/18/2003

-

APPLIES TO

 The Standard C++ Library, when used with:  Microsoft Visual C++ 5.0 Enterprise Edition

 Microsoft Visual C++ 5.0 Professional Edition 

-



This article was previously published under Q200495



SYMPTOMS
If you try to create an object of type bad_typeid in an application built with the DLL version of the C run-time library (/MD ), you get the following link errors:

error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::bad_typeid::~bad_typeid(void)" (__imp_??1bad_typeid@std@@UAE@XZ)

error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::bad_typeid::bad_typeid(char const *)" (__imp_??0bad_typeid@std@@QAE@PBD@Z)



RESOLUTION
Link with any of the the static versions of the C run-time library (/MT or /ML).



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ version 6.0.

<div class="moreinformation_section">

MORE INFORMATION
The following sample program demonstrates the problem: //Sample.cpp //Compile options : /MD #include using namespace std; int main {       bad_typeid bid; return 0; }

Keywords: kbbug kbfix kbvc600fix KB200495

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.