Microsoft KB Archive/191663

= You receive a "file.obj : error LNK2001: unresolved external" error message when building an application =

Article ID: 191663

Article Last Modified on 9/1/2005

-

APPLIES TO


 * Microsoft Windows CE Toolkit for Visual C++ 6.0
 * Microsoft Windows CE Embedded Toolkit for Visual C++ 5.0
 * Microsoft Windows CE Platform Builder 2.11

-



This article was previously published under Q191663



SYMPTOMS
Building an application results in one or more of the following errors:

  file.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)

  file.obj : error LNK2001: unresolved external symbol __CxxThrowException



CAUSE
This product does not currently support C++ exception handling or run-time Type Information.



RESOLUTION
Remove all references to C++ exception handling from the project. These include:


 * /GX switch
 * /GR switch
 * Use of catch-and-throw keywords



STATUS
This behavior is by design.

Note Microsoft Windows CE Toolkit for Visual C++ 6.0 now generates warning C4531 when compiling for Windows CE version 2.10 and later.



Steps to reproduce the behavior
The following example generates the previously mentioned errors when built for a Windows CE target platform: #include 

int WINAPI WinMain(      HINSTANCE hInstance,       HINSTANCE hPrevInstance,       LPTSTR lpCmdLine,       int nCmdShow ) { throw 1; return 0; }

Additional query words: kbDSupport

Keywords: kberrmsg kbtshoot kbprb kbcpponly KB191663

-

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

© Microsoft Corporation. All rights reserved.