HELP : Value Too Large

2002-02-27 Thread N

I am getting these error.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30022:
Error: Value of 67976 too large for field of 2 bytes
at 0x3ae
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30022:
Error: value out of range
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30039:
Error: Value of 68042 too large for field of 2 bytes
at 0x3de
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30039:
Error: value out of range
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30240:
Error: Value of 67976 too large for field of 2 bytes
at 0x3ae
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30240:
Error: value out of range
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30257:
Error: Value of 68042 too large for field of 2 bytes
at 0x3de
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30257:
Error: value out of range


My Command is :
m68k-palmos-gcc -O1 -Wa,-J   student.o
student-sections.o student-sections.ld  -o "Student"

My C file have 14k lines of code.   The only solutin I
can reach for this is break big C file into multiple
file, which I really don;t want.

Please advise and suggest if there is way around.

Thanks,


__
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

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



Re: HELP : Value Too Large

2002-02-27 Thread Terry Dennis

This is a basic "C" problem and has nothing to do with Palm OS, or with the
size of your application..

A 2 byte unsigned integer can hold a maximum value of 65535.

Obviously, you're trying to stuff 10 pounds of a number into a 5 pound sack.

Either change your definition from a 2 byte integer to a 4 byte integer, or
use smaller numbers.



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



Re: HELP : Value Too Large

2002-02-28 Thread John Marshall

On Wed, Feb 27, 2002 at 02:45:38PM -0800, "N" wrote:
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30022:
> Error: Value of 67976 too large for field of 2 bytes
> at 0x3ae
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccNhnO10.s:30022:
> Error: value out of range
[...]
> My C file have 14k lines of code.   The only solutin I
> can reach for this is break big C file into multiple
> file, which I really don;t want.

You are probably running into the problem mentioned in

http://www.escribe.com/computing/pcpqa/m24991.html

and the workaround is indeed to break your source file into multiple
translation units.

However, I'm having difficulty reproducing this problem at the moment
with my current toolchain (which may conceivably mean it's been solved!,
but I wouldn't want to bet on it).  If you could send me your source
file (off-list; the source after preprocessing, i.e., the output of -E)
and the command you use to compile it (the command you gave was the link
command), that would be helpful.

On Wed, Feb 27, 2002 at 09:28:18PM -0700, Terry Dennis wrote:
> This is a basic "C" problem and has nothing to do with Palm OS, or with the
> size of your application..

If that were the case, it would have been the C compiler producing a
useful diagnostic, rather than the assembler producing an odd one.

John

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