Place that function near the function from where you are calling that as in
codeworrior if function are very far from each other it gives this error.

-----Original Message-----
From: Peter Epstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 4:33 PM
To: Palm Developer Forum
Subject: Re: 16-bit code reference out of range error message


At 01:26 PM 12/13/2000, Jacky Cheung wrote:
>I get a Link Error saying that an EventHandler 16-bit code reference to a
>function is out of range.  Does anyone know what the problem is and how I
>can get around it?

This should definitely be in the knowledge base, so have a look there for
more details. The basics: you're using the small memory model in your target
settings, and that means you're limited to 32K max distance between any
procedure call site and the procedure called. This limit is in addition to
the inherent 64K limit per segment. The easiest solution is to switch to the
"smart" memory model in your target settings. This will cause the compiler
to work around the 32K limit of the 68000 core instructions, but that will
make your application a bit bigger and slower. A better solution is to
switch to the segments view and rearrange the files within each segment so
that the 32K limit isn't exceeded. If necessary, you can break your code up
into multiple segments, but be aware that certain code has to be in the
first segment. Again, see the knowledge base for details.
--
Peter Epstein
Palm Inc. Developer


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

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