QW said: > Hi, all. > I am using CodeWarrior5.0 on Win95 developing Palm application. > I encountered a weird problem. > Whenever I have more than 60 calls to MemPtrNew function CodeWarrior > give me > a Link error: Link Error : (Starter.c: 'AppStart' 16-bit code > reference to 'OpenOrCreateDB' is out of range.) > If I comment out one MemPtrNew call then everything is fine again. > Does anybody know what's going on? > Any hint is appreciated! Alexy replied: >Hi! > Are your application bigger 32K? >If yes try set on project settings/code/generation/68K processor/code model >into Large. JK Lam added: >This snippet from the CodeWarrior for Palm Computing platform FAQ >(http://www.metrowerks.com/pda/palm./faq) might help: > >7.2 When building my application the linker reports "16-bit reference out of >range." How do I fix this? (Typically this occurs to users who have had a >large application working for some time and have just added "a little more >code" to the application.) [snip] Note that if you go to large or (better) smart code models, you still have the restriction of a 64K code resource - this comes from HotSync/MemoryMgr, not the compiler/linker or 68K processor. If you've got more than 64K of code, then your typical options are a multi-seg app, roll-your-own code loader, or shared libraries. -- Ken Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200 (direct) +1 408-261-7550 (main)
