> 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;
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/