Well, include the run-time library that will introduce the NEW operator or
write one yourself. Implementing new is easy, but may only reveal you need
to implement new_array_ as well. That's what I ended up with, because didn't
want to use the runtime library for some reasons.

Normally, dust include the MSL Runtime library (2i) and you are supposed to
be fine.

- bobby

-----Original Message-----
From: Eugene Mayevski [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 11:47 AM
To: Palm Developer Forum
Subject: extern "C" and operator new


Hello!

I am using CodeWarrior 6 to compile a shared library. There is a need to
have C++ enabled, so I declare functions that will be exported as extern "C"
(I have declare at least _Startup_ function this way). But if I include at
least one extern "C" statement, I get linker error "operator new ... used in
... is undefined".

Here's how I declare startup function:

extern "C" Err __Startup__(UInt refNum, SysLibTblEntryPtr entryP)
{
 entryP->dispatchTblP = (Ptr*)MyLibDispatchTable();
 entryP->globalsP = 0;
 return 0;
}

Any help is much appreciated.

--
Sincerely Yours,
Eugene Mayevski


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

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

Reply via email to