Am Fre, 2003-09-12 um 08.11 schrieb Victor .:
Hi,
> m68k-palmos-gcc charhack.c -o charhack -nostartfiles
> m68k-palmos-obj-res charhack.c
> build-prc charhack.prc -t HACK "Char-Hack" CHRH *.grc
> *.bin
>
> All run without any error. However when I run it using
> my XMaster. When I
> activate this code. I got Fatal Alert:
>
> hacks.c, Line:596, no code resource for trap [Reset].
Download RsrcEdit, it's a nice tool. If you open your hack on the Palm
you will see that it has a code 1 resource, but not the desired code
1000 resource, as required.
> Does anybody knows how to run this code properly? I
> tried to patch another
> system trap but it shows similar error. Please help.
It has nothing to do with your code itself, but with the way you
compile. The patches need to be in a code resource with the proper ID
(1000 in this case), which you have not done, so X-Master does not find
the code resource ("no code resource for trap").
Solutions:
* classic way: call your file code03e8.c and have it compiled to
code03e8.bin (which will be included as 'code 1000' resource) or
name it whatever way you want and move the compilation result to
code03e8.bin
* modern way: use
#include <Standalone.h>
HACKMASTER_TRAP(sysTrapSysHandleEvent)
in your patch, which will generate the proper code resource plus
the required trap resource (so you do not need to specifiy it in
the rcp file). For prefs code resource you should use
STANDALONE_CODE_RESOURCE_ID(0x7d0) as this one needs to have a
fixed ID.
For more details, read the doc at
http://prc-tools.sourceforge.net/doc/prc-tools_3.html#SEC22
--
Daniel Seifert <[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/