Hi,

I could solve the linkage problem 
Link Error : __RuntimeModule__: 'TestSharedLibInstall' referenced from
'__DummyStartup__' is undefined.

I just used the extern "C" before the function.

But i wasnt able to call the c++ class functions.lemme explain.

I just added a c++ class with small test functions.

I wrote wrapper function in the shared lib in which i instantiated the class
p*tr and i just call the attach()function of the class just to attach a
string value and returning it through the wrapper function.


I just called the wrapper function in the application dynamically after
loading the library.
But i wasnt able to get required result.

///..............This is test function.
//////////////////////////////////////////////////////
void CStarter::AttachString (char* string)
{
  StrCat(string,"hira");
  //.....
}

//..................This is the wrapper function
/////////////////////////////////////////////////////////////
Err TestSharedLibMessage(UInt16 refNum,char* name)
{
   #pragma unused(refNum)
   
        CStarter* pLstrt;
        pLstrt=(CStarter*)MemPtrNew(sizeof(CStarter));
      pLstrt->AttachString(name);

    return errNone;
} 
///.........I am calling in this way in the application...........
 char name[10]={"bava"};
.....
error=TestAttachString(TestSharedLibRef,name);
........


The CStarter class doesnot hav any virtual functions .

I wrote functions which would return the class pointers to the
application.Can we call the class functions using that pointer returned from
the wrapper function??

I refered to Ben's suggestion of using a sentinel...,but i cudnot get that,
moreover that discussion ended in the middle it seems.

Moreover Simulator is getting closed by giving the following error...

I:\Ripple\ARM\Core\Emul68K\SrcSlowEmu\Run68K.c, Line:4427, Unhandled instr


Am i going wrong anywhere??Can anybdy provide hints in sorting this out.

Thanx In advance..

Best Regards
Anilb

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

Reply via email to