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

C++ exceptions with Pocket PC 2003

4 views
Skip to first unread message

Oleg Kibirev

unread,
Sep 4, 2003, 9:19:34 PM9/4/03
to
Hi,

I am trying to use C++ exceptions with PPC2003 SDK and
get the following unresolved externals:

y.obj : error LNK2001: unresolved external symbol "const
type_info::`vftable'" (??_7type_info@@6B@)
y.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned
int,int,void (__thiscall*)(void *))" (??
_M@YGXPAXIHP6EX0@Z@Z)
y.obj : error LNK2019: unresolved external symbol "void
__stdcall `eh vector constructor iterator'(void
*,unsigned int,int,void (__thiscall*)(void *),void
(__thiscall*)(void *))" (??_L@YGXPAXIHP6EX0@Z1@Z)
referenced in function _DllMain

Here is the code that generated the error messages:

struct A {
A() {}
~A() {}
};


BOOL APIENTRY DllMain( HANDLE hModule, DWORD
ul_reason_for_call, LPVOID lpReserved )
{
try {
A a[2];
throw 1;
} catch(int) {}
return TRUE;
}

Does Microsoft support C++ exceptions with WinCE.NET 4.2
(it seems so from the product page)? Did anyone get it to
work successfully?

Thanks!
Oleg

Maarten Struys

unread,
Sep 5, 2003, 1:07:06 AM9/5/03
to
Even though CE 4.2 does suport C++ exceptions, PPC 2003 does not. Keep in
mind that PPC 2003 is a platform build on top of CE 4.2 and it seems that
the PPC people left C++ exceptions out of their platform.

--
Regards,

Maarten Struys
PTS Software bv

"Oleg Kibirev" <Oleg.K...@oracle.com> wrote in message
news:260701c3734b$c4216450$a601...@phx.gbl...

Udara W Gunawardane

unread,
Sep 5, 2003, 5:34:03 AM9/5/03
to
refer thread with topic "Try-catch support in an ATL COM developed with eVC
4.0 for PPC2003" in this same newsgroup.
UG

"Oleg Kibirev" <Oleg.K...@oracle.com> wrote in message
news:260701c3734b$c4216450$a601...@phx.gbl...

Michael J. Salamone

unread,
Sep 5, 2003, 6:19:29 AM9/5/03
to
Actually PPC2003 does support C++ exceptions. It does not support, however,
RTTI. You are trying to use RTTI in your app, and thus the linker errors.

--

Michael Salamone
Entrek Software, Inc.
www.entrek.com


"Maarten Struys" <maarten...@nospam.pts.nl> wrote in message
news:ubgHJu2c...@tk2msftngp13.phx.gbl...

Maarten Struys

unread,
Sep 5, 2003, 2:52:23 PM9/5/03
to
Oops, of course you are right Michael. I messed up, probably not quite awake
at the time I replied.

--
Regards,

Maarten Struys
PTS Software bv

"Michael J. Salamone" <mik...@entrek.com> wrote in message
news:enLqXd5c...@tk2msftngp13.phx.gbl...

Sanjay

unread,
Sep 18, 2003, 11:48:39 PM9/18/03
to
So just to clarify, it seems like PocketPC 2003 does support C++
exceptions but not RTTI. If this is indeed correct, does the C++
excpetion handling mechanism require RTTI, because I continue to get
the "vftable" linkage error described below using Embedded Visual C++
4.0 SP2?

Thanks.

Sanjay

"Udara W Gunawardane" <uda...@empriseit.com> wrote in message news:<ewerOE5c...@tk2msftngp13.phx.gbl>...

James "Wez" Weatherall

unread,
Sep 19, 2003, 11:22:14 AM9/19/03
to
Sanjay,

It seems that Microsoft released a broken PocketPC SDK - PPC2003 does
support both C++ exceptions and RTTI but the SDK compiler fails to produce
the virtual destructor for type_info, so RTTI won't work and thus typed C++
exceptions won't either.

One person has suggested defining:

type_info::~type_info() {}

somewhere in your application, as a temporary workaround, but it's not clear
whether that will cause other problems!

Another way around this is apparently to get hold of some files from
www.entek.com, which provide their own RTTI support library - again, it's a
temporary fix until the SDK compiler gets sorted.

Hope that helps,

Dr. James Weatherall


0 new messages