exception handling in wdk
<p>I can't use exception handling in native subsystem.</p>

<p>This is my cpp file: </p>

<pre><code>#include &lt;ntddk.h&gt;
#include &lt;exception&gt;

int __cdecl  main () {
    try
    {
      throw 20;

    }
    catch (int e)
    {

    }

    return 0;
}
</code></pre>

<p>And my sources file:</p>

<pre><code>TARGETNAME = native
TARGETTYPE = PROGRAM
UMTYPE = nt
USER_C_FLAGS=$(USER_C_FLAGS) /EHa
SOURCES = exeption.cpp \

INCLUDES=$(DDK_INC_PATH)
MINWIN_SDK_LIB_PATH=$(SDK_LIB_PATH)
TARGETLIBS=$(NTDLL_CRT) $(SDK_LIB_PATH)\ntdll.lib lib.lib
</code></pre>

<p>And my error's are:</p>

<pre><code>error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$_main

error LNK2019: unresolved external symbol __EH_epilog3 referenced in function __catch$_main$0

error LNK2019: unresolved external symbol __EH_prolog3_catch referenced in function _main

error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function _main

error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
</code></pre>

<p>How can I solve the problem?</p>
