> All of the link warnings are due to having both CWRuntime.c and the
runtime
> lib in the project.  You can safely remove CWRuntime.c from your library.

Mengtao: I deleted CWRuntime.c from the project and thus eliminated all the
link warnings.
Thanks.

> Link Error   : NewMore.cp: 'std::bad_alloc::__vt' has illegal single
segment
> >32-bit reference to 'std::bad_alloc::~bad_alloc()'.
>
> This is a bigger problem... I forgot that new/delete in the runtime use
> exceptions, which require global variables.  You would do better with
> inline forms of new/delete.
>
> I refer you to http://www.palmoswerks.com/stories/storyReader$15 for an
> article on using new and delete in this fashion.

Mengtao: I created a header file called "NewDeleteImpl.h" and included <new>
and copied the inline forms of new/delete
posted as the second solution in your article to this header file. Then I
included  "NewDeleteImpl.h" to a source file called "CFieldInfo.cpp" where I
use "new" and "delete". All the old messy link errors are gone but I got a
new link error:

Link Error   : CFieldInfo.cpp: '__unexpected' referenced from 'operator
delete[](void*)' is undefined.

Seems to me the "__unexpected" is a global which is supported by shared lib.
But where is it and  how to get rid of it since I already deleted
PalmOSRuntime_2i_A5.lib from my project and the "NewDeleteImpl.h" should be
the only place I define new/delete. May I get your oppinion? Thank you!





> --
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to