Philip Sheard <[EMAIL PROTECTED]> wrote in message
news:33152@palm-dev-forum...
>
> > Hi everyone,
> >
> > I am trying to develop a shared library which will contain a couple of
C++
> > classes.
> >
> > I can do the following:
> >
> > Classname classvar; // calls the default constructor.
> >
> > The above is fine, no problem.
> >
> > But if I try to do the following:
> >
> > Classname *classvar;
> > classvar = new Classname();
> > delete classvar;
> >
> > I get these link errors:
> >
> > Link Error   : SampleLib.cpp: 'operator new(unsigned long)' referenced
> from
> > 'SampleLibSetCornerDiameter' is undefined.
> >
> > Link Error   : SampleLib.cpp: 'operator delete(void*)' referenced from
> > 'SampleLibSetCornerDiameter' is undefined.
> >
> > Does anyone know why this happens and how to get it to work? I suspect I
> > have left something out.
> >
> it looks as though you have made a forward definition, viz:
>
> class Classname;
>
>
>
The exact same code compiles and links fine if it is in a C++ application
using PalmOS 3.5 stationary under CWr6, but does not work if it is in a
shared library. How do you explain that? Has anyone used C++ with shared
libraries before?



-- 
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