This is driving me nuts !!
I really don't know what am I doing wrong ...

I'm trying to implement a hack for HackMaster (or XMaster, whatever).

I'm using the code sample projects for CodeWarrior called "DemoHack"
and "HackTemplate".
As a starter I'm just trying to add a simple patch to one of these projects.
First of all I gotta say that those sample projects compile on my
CodeWarrior 7
and work correctly on my Palm device.
The problem is when I try to add my own patch, I always get the following
link error:

__RuntimeModule__: 'GrfProcessStrokePatch' referenced from
'__DummyStartup__' is undefined

So now let me detail the settings of my patch:

- as you guessed I'm patching GrfProcessStroke function,

- I've added the corresponding TRAP resource 0xA292 of for that function,
  exactly as it is done for the other patches in the sample project.
  ResID is 1002 (there are already two patches of ResID 1000 and 1001 in
DemoHack)

- I've created a new target called 'GrfProcessStrokePatch'  by cloning the
settings
  from one of the already existing patches in the sample project
(HackTemplate)

- I've modified those settings accordingly to my patch, that is, in 68K
Target :
      Project Type : PalmOS Code Resource
      File Name    : patch1002.tmp
      Sym name   : patch1002.sym
      Resource Name : GrfProcessStrokePatch
      Entry Point    : GrfProcessStrokePatch
      ResType   : CODE
      ResID       : 1002

- I've added a source file to my target called GrfProcessStrokePatch.cpp :

   #include <PalmOS.h>
  #define       myCreator       'XmpL'
  #define       myResID          1002

  typedef       Err     (*myInterface)(PointType *startPtP, PointType
*endPtP, Boolean upShift);

  Err MyGrfProcessStroke(PointType *startPtP, PointType *endPtP, Boolean
upShift);

  Err MyGrfProcessStroke(PointType *startPtP, PointType *endPtP, Boolean
upShift)
  {
        WinDrawChars("glop", StrLen("glop"), 50, 50 );


        return 0;
  }


Of course I'm not doing anything yet in my patch, this is just a test, but I
still get that freakin
link error !!

I just don't get it ...


PS: I have noticed that, with DemoHack, if I put my patch in a .c file
rather than a .cpp file, I don't get the link
error but the patch won't work.

   

  

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