Paul Gargan wrote:
> I'm trying to use the 'long long' integer data type
> I've used "#pragma longlong on" in all source files
This pragma shouldn't be needed; the C Compilers Reference (page CCR-50)
says this setting is already on by default.
> it causes Link Errors such as "'__rt_sltoi64'
> referenced from '<function name>' is undefined." It lists other
> symbols as being undefined such as '__rt_mul64', '__rt_divu64',
> '__rt_cmpu64' etc.
These are the runtime library functions for 64-bit ops. The compiler
inserts calls to them wherever your code does 64-bit math. (There is no
way to make the compiler 'inline' those ops.) The problem here is that
your project doesn't link with a library containing these functions. It
sounds like your runtime library is StartupCode.lib, which is the
runtime library with minimal features.
To fix it, change your project's runtime library from StartupCode.lib to
"MSL Runtime Palm OS (2i).lib" which does contain those functions. (Or
use the "(4i).lib" version if using 4-byte ints.)
The documentation doesn't seem to cover this issue.
-slj-