Re: Link Error help needed

2008-05-29 Thread Jim Duffy
extern extern

yes yes

It works now, thanks a bunch

Jim
McMicken, Steven <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Make sure that function 'MainFormHandleEvent' is not declared as static.
> You should also put a function prototype in the header file (MainForm.h)
for
> the module (MainForm.c) that includes 'MainFormHandleEvent'.  You must do
> this for any function that you call from outside the module (.c file) that
> it is contained in.  Hope this solves your problem.
> Regards,
> Steve
>
> -Original Message-
> From: Jim Duffy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 03, 2000 6:29 PM
> To: Palm Developer Forum
> Subject: Link Error help needed
>
>
> Hi everyone,
>
> as a novice to C and C++ as well as palm programming.
>
> I am working on my first palm program now which I started using the
standard
> palm os 3.1 stationary provided in Code Warrior.
>
> I have about 7 forms all working together fine.  I have been dumping all
the
> related functions into the Starter.c file.
>
> I am now trying to separate this file into smaller more organized files
but
> having difficulty getting it to work.
>
> right now I only moved the MainForm functions into a file named MainForm.c
> and then included all its defines into MainForm.h.
>
> I then added both these files to the project and then added MainForm.h at
> the top of Starter.c
>
> In addition, I also included all the other #includeds found at the top of
> Starter.c into MainForm.c and also included its own .h file.
>
> All the file Compile with no trouble, but I keep getting a Link Error that
> says:
>
> Starter.c 'MainFormHandleEvent' referred from 'AppHandleEvent is
undefined.
>
> Does anyone know what might be causing this error or how to fix it???
>
> My roomate (an experienced windows programmer) could not figure this out,
so
> I am wondering if it has something to do with Code Warrior itself.
>
>
> Thank you very much for the help and I apologize for this kind of long
post.
>
> Jim
>
>
>
>
>
>
>
>
>
> --
> 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 ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error while creating a library

2008-05-29 Thread Dave Lippincott
If you're using Codewarrior, make sure the option 'Target/68K Target/File
Name' matches what's entered in 'Linker/PalmRez Post Linker/Mac Resource
Files' entry


>
> Link Error   : __RuntimeModule__: '__Startup__' referenced from
> '__DummyStartup__' is undefined.
>
>
> Thanks
> Ralph Krausse




-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link Error : Could not open file: C:\palmSDK\SampleCode\HelloWorld\HelloWord\RESOURCE.FRK\Starter.tmp

2008-05-28 Thread Jim Duffy
I could be wrong on this but...

I beleive you should use double slashes instead of one so the compiler does
not take it as an escape sequence.

like
#include "C:\\PalmSDK\\Sample Code\\Hello World\\Hello
World\\RESOURCE.FRK\\Starter.tmp"

try that.

Jim


Muthuraj Velayutham <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> My project compiles without any error. While linking I am getting this
error
> :
>
> Link Error   : Could not open file:
> C:\palmSDK\SampleCode\HelloWorld\HelloWord\RESOURCE.FRK\Starter.tmp
>
> I am using CodeWarrior 6.0.
>
> Any Help.
>
>
> Muthu
>
>
>





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link Error : Out of Range

2008-05-28 Thread Dave Lippincott
See if the Knowledge Base can help:
http://oasis.palm.com/dev/kb/faq/1418.cfm

- Original Message -
From: "Richard.Johnstone" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" 
Sent: Tuesday, November 28, 2000 1:14 PM
Subject: Link Error : Out of Range


> When I compile a project it all compiles with no errors. I then create a
> .lib file of this project and it is still fine.
> When I attatch this lib file to another project and compile it I get these
> bizarre link errors.
>
> Link Error   : ZoomDriverLog.c: 'getClickTime' 16-bit code reference to
> 'RestoreScreenStringValue' is out of range.
>
> Link Error   : EnterUpdatedInfo.c: 'setFields' 16-bit code reference to
> 'EnableControl' is out of range.
>
> Link Error   : EnterUpdatedInfo.c: 'StoreUpdatedData' 16-bit code
reference
> to 'GetScreenListValue' is out of range.
>
> Link Error   : EnterUpdatedInfo.c: 'StoreUpdatedData' 16-bit code
reference
> to 'Debug' is out of range.
>
> Link Error   : EnterUpdatedInfo.c: 'StoreUpdatedData' 16-bit code
reference
> to 'GetObjectPtr' is out of range.
>
> The calls like 'RestoreScreenStringValue' and 'EnableControl' are being
used
> in other places but no error is being mentioned.
> Is this an issue with the size of the project getting too big?? It is 40K.
I
> really am stumped as I have had these before and they sometimes seem to
just
> disapear without me seemingly doing anything.
>
>
>
> --
> 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 ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-15 Thread heath . schaefer
Anyone else find it humorous that the subject is 'Link error" and Lincoln 
is helping? :>

I have a son named Lincoln and I call him Link all the time too. :>



/**
Heath Schaefer
Product Engineer
Sporlan Division, Parker Hannifin Corporation
636.239.7711 x243
**/



Lincoln Ramsay <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
05/15/2008 08:12 AM
Please respond to
"Palm Developer Forum" 


To
"Palm Developer Forum" 
cc

Subject
Re: Link error






On 15/05/2008, at 1:15 PM, Vivian Chen wrote:
> Would you help me if I have any question in future?

I'm on this list so post here and I'll help if I can.

-- 
Link



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, 
please see http://www.access-company.com/developers/forums/



-
"PLEASE NOTE: The preceding information may be confidential or
privileged. It only should be used or disseminated for the purpose
of conducting business with Parker. If you are not an intended
recipient, please notify the sender by replying to this message and
then delete the information from your system. Thank you for your
cooperation."
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: Link error

2008-05-15 Thread Lincoln Ramsay

On 15/05/2008, at 1:15 PM, Vivian Chen wrote:

Would you help me if I have any question in future?


I'm on this list so post here and I'll help if I can.

--
Link



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-14 Thread Vivian Chen
To Lincoln:

^^ Thanks for your help. Now I know at least two things.

1. The configuration of linker is correct. I link my lib with cygwin. And I've 
learnt much about it.

2. I think I must make more clearly which action is allowed on PALM OS, 
especially in ARM-side.

Would you help me if I have any question in future?


2008-05-15 



Vivian Chen 



发件人: Lincoln Ramsay 
发送时间: 2008-05-14  19:53:42 
收件人: Palm Developer Forum 
抄送: 
主题: Re: Link error 
 
On 14/05/2008, at 7:54 PM, Vivian Chen wrote:
> Because my library has called some standard C library functions in  
> it. And when I debug the project, there's a crash.
As I've already said, without the actual error messages you're  
getting from the computer we can only guess what the problem is.
> Do you have some suggetions when use the standerd C library  
> functions in Garnet?
The short answer is "don't do it".
> In "Palm OS 68K API Documentation", it says that to use Palm OS  
> functions rather than standard C library functions directly.
...
> But Palm OS functions are also based on standard C library  
> functions. Are they?
The Palm OS functions are not based on "the standard C library". The  
standard C library is just an API that many systems provide. Palm OS  
does not provide the standard C library but it provides analogues for  
some of the functions.
When you build an app for Palm OS and you use standard C library  
functions there are 2 things you need to be aware of.
1) The function must be available. The easiest way to ensure this is  
to link to a static libc.
2) The function must not use kernel calls that are not provided on  
Palm OS. Things like string handling can be done entirely in user  
space but thing like malloc rely on the kernel to do their work.
If you are creating a .dll for the simulator then I'm pretty sure you  
must use the same standard C library that the simulator uses so you  
will need to confirm which one that is. It could be Cygwin, it could  
be the Windows C library (crt.dll) or even one of the newer Visual  
Studio libs (eg. msvcrt.dll).
Getting a crash using standard C library functions could indicate  
that you are using a function that makes kernel calls or that your C  
library's structures have not been initialised properly (eg. because  
the process that loads your .dll was using a different libc).
If you really want to use libc functions you would be better off  
implementing them yourself on top of the Palm OS APIs because then  
you would be sure that they will work identically in .dlls and as 68k  
or ARM code running on a device.
-- 
Link
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-14 Thread Lincoln Ramsay

On 14/05/2008, at 7:54 PM, Vivian Chen wrote:
Because my library has called some standard C library functions in  
it. And when I debug the project, there's a crash.


As I've already said, without the actual error messages you're  
getting from the computer we can only guess what the problem is.


Do you have some suggetions when use the standerd C library  
functions in Garnet?


The short answer is "don't do it".

In "Palm OS 68K API Documentation", it says that to use Palm OS  
functions rather than standard C library functions directly.

...
But Palm OS functions are also based on standard C library  
functions. Are they?


The Palm OS functions are not based on "the standard C library". The  
standard C library is just an API that many systems provide. Palm OS  
does not provide the standard C library but it provides analogues for  
some of the functions.


When you build an app for Palm OS and you use standard C library  
functions there are 2 things you need to be aware of.


1) The function must be available. The easiest way to ensure this is  
to link to a static libc.


2) The function must not use kernel calls that are not provided on  
Palm OS. Things like string handling can be done entirely in user  
space but thing like malloc rely on the kernel to do their work.


If you are creating a .dll for the simulator then I'm pretty sure you  
must use the same standard C library that the simulator uses so you  
will need to confirm which one that is. It could be Cygwin, it could  
be the Windows C library (crt.dll) or even one of the newer Visual  
Studio libs (eg. msvcrt.dll).


Getting a crash using standard C library functions could indicate  
that you are using a function that makes kernel calls or that your C  
library's structures have not been initialised properly (eg. because  
the process that loads your .dll was using a different libc).


If you really want to use libc functions you would be better off  
implementing them yourself on top of the Palm OS APIs because then  
you would be sure that they will work identically in .dlls and as 68k  
or ARM code running on a device.


--
Link



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-14 Thread Vivian Chen
To Lincoln:

Thanks for your help.

Because my library has called some standard C library functions in it. And when 
I debug the project, there's a crash.

But I can't debug in the library. So I want to know whether it refers to the 
compiler.

Now, I think it doesn't.

Do you have some suggetions when use the standerd C library functions in Garnet?

In "Palm OS 68K API Documentation", it says that to use Palm OS functions 
rather than standard C library functions directly.

So I think whether Palm OS supports to standard C library functions.

But Palm OS functions are also based on standard C library functions. Are they?

Does there have any limit? 


2008-05-14 



Vivian Chen 



发件人: Lincoln Ramsay 
发送时间: 2008-05-14  17:39:03 
收件人: Palm Developer Forum 
抄送: 
主题: Re: Link error 
 
On 14/05/2008, at 11:32 AM, Vivian Chen wrote:
> Thanks. I really know very little about the cygwin.
>
> How to link project to the cygwin? I think I have. Must I choose - 
> mno-cygwin? If I choose, I get a "undefined reference to" error.
-mno-cygwin means your app will not be linked to Cygwin. You should  
just leave that switch off to link to Cygwin.
> As you said, if I want to use POSIX APIs, I must do it. And If I  
> won't, I needn't. Is it right?
Yes... but you might not get to make that decision anyway since  
you're creating a .dll that some other app will load.
> If I want to link with -mno-cygwin, and won't get a "undefined  
> reference to" error, how can I do?
Why do you want to link with -mno-cygwin? Did you actually have a  
problem linking to Cygwin or are you guessing that you don't need it?
When you talk about error messages you need to include the entire  
message or we're left guessing what the problem is. You say  
"undefined reference to"... to what?
-- 
Link
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-14 Thread Lincoln Ramsay

On 14/05/2008, at 11:32 AM, Vivian Chen wrote:

Thanks. I really know very little about the cygwin.

How to link project to the cygwin? I think I have. Must I choose - 
mno-cygwin? If I choose, I get a "undefined reference to" error.


-mno-cygwin means your app will not be linked to Cygwin. You should  
just leave that switch off to link to Cygwin.


As you said, if I want to use POSIX APIs, I must do it. And If I  
won't, I needn't. Is it right?


Yes... but you might not get to make that decision anyway since  
you're creating a .dll that some other app will load.


If I want to link with -mno-cygwin, and won't get a "undefined  
reference to" error, how can I do?


Why do you want to link with -mno-cygwin? Did you actually have a  
problem linking to Cygwin or are you guessing that you don't need it?


When you talk about error messages you need to include the entire  
message or we're left guessing what the problem is. You say  
"undefined reference to"... to what?


--
Link



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-13 Thread Vivian Chen
To Lincoln:

Thanks. I really know very little about the cygwin.

How to link project to the cygwin? I think I have. Must I choose -mno-cygwin? 
If I choose, I get a "undefined reference to" error.

As you said, if I want to use POSIX APIs, I must do it. And If I won't, I 
needn't. Is it right?

But I don't know which functions used in the library. Maybe they are defined in 
POSIX APIs.

If I want to link with -mno-cygwin, and won't get a "undefined reference to" 
error, how can I do?

Can you tell me?

Thanks again. ^^


2008-05-14 



Vivian Chen 



发件人: Lincoln Ramsay 
发送时间: 2008-05-13  22:48:00 
收件人: Palm Developer Forum 
抄送: 
主题: Re: Link error 
 
On 13/05/2008, at 1:28 PM, Vivian Chen wrote:
> I've search from Google that -mno-cygwin mean to use mingw to  
> compile not cygwin. And -nostdlib means not to use standard library.
>
> The second one is easily to be understood. But I'm quite confused  
> to the first one.
>
> My library is compiled by gcc. What's the difference between mingw  
> and cygwin?
You have a Cygwin-based GCC. The -mno-cygwin lets it work like the  
MinGW compiler. This means you will not have the cygwin.dll  
dependency but it also means you won't have POSIX APIs, only what  
Windows gives you (ANSI C).
> If not choose -mno-cygwin, when I debug it , it would use Cygwin1.dll?
No.
> Another thing, if I link without -mno-cygwin, it would works well  
> in a PNO project (at least can startup).
>
> But if do, it would not startup in a Protein project.
>
> It would appear an error says "SIGSEGV signal availabel:  
> segmentation fault"
>
> What's the problem?
SIGSEGV signal ... is that meant to be "unavailable"?
ANSI C has only a few signals (though SIGSEGV is one of them). If the  
hosting process (simulator) is using Cygwin and your code is not, the  
definition of SIGSEGV (and other, more important things) may be  
different. Try linking your Protein project to Cygwin.
-- 
Link
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Link error

2008-05-13 Thread Lincoln Ramsay

On 13/05/2008, at 1:28 PM, Vivian Chen wrote:
I've search from Google that -mno-cygwin mean to use mingw to  
compile not cygwin. And -nostdlib means not to use standard library.


The second one is easily to be understood. But I'm quite confused  
to the first one.


My library is compiled by gcc. What's the difference between mingw  
and cygwin?


You have a Cygwin-based GCC. The -mno-cygwin lets it work like the  
MinGW compiler. This means you will not have the cygwin.dll  
dependency but it also means you won't have POSIX APIs, only what  
Windows gives you (ANSI C).



If not choose -mno-cygwin, when I debug it , it would use Cygwin1.dll?


No.

Another thing, if I link without -mno-cygwin, it would works well  
in a PNO project (at least can startup).


But if do, it would not startup in a Protein project.

It would appear an error says "SIGSEGV signal availabel:  
segmentation fault"


What's the problem?


SIGSEGV signal ... is that meant to be "unavailable"?

ANSI C has only a few signals (though SIGSEGV is one of them). If the  
hosting process (simulator) is using Cygwin and your code is not, the  
definition of SIGSEGV (and other, more important things) may be  
different. Try linking your Protein project to Cygwin.


--
Link



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: Link Error

2006-09-15 Thread Sheshu Kumar Inguva
Check if you crossed 64k segment limit.

If not move files up and down in Link order and recompile. This is for CW.

Regards,
Sheshu Kumar Inguva

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of nitin baranwal
Sent: Friday, September 15, 2006 3:40 PM
To: Palm Developer Forum
Subject: Link Error

Any idea why this error is coming.. Till now my
application was behaving correctly but suddenly i got
this error...

Link Error   : Starter.cpp: 'StarterPalmMain(unsigned
short,void*,unsigned short)' 16-bit code reference to
'RomVersionCompatible(unsigned long,unsigned short)'
is out of range.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/448 - Release Date: 9/14/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/448 - Release Date: 9/14/2006
 


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


Re: Link error : PalmOS_Startup.c: 'PilotMain' referenced from '__Startup__' is undefined

2006-03-26 Thread Donald C. Kirker
"Brian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I'm still getting the same error. Any suggestions?

I would assume that the answer is yes, but just to make sure; do you have a
function named PilotMain (something declared like: UInt32 PilotMain(UInt16
cmd, void *cmdPBP, UInt16 launchFlags))? If not, you will need this as the
startup routine (__Startup__ as per CW case) makes a call to the PilotMain
function.

Regards,
Donald



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


Re: Link Error : PalmRez Error: tbmf 1000 has no bitmaps. Compilation halted

2005-08-29 Thread Omar Espinoza
I have a seemed problem, it is with the size of my resources and with my 
Ultralite project. How I can know if my CodeWarrior 8 is a DEMO version.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Link error for shared library

2005-03-10 Thread Ben Combee
At 09:30 AM 3/10/2005, you wrote:
Hi Everybody,
First, I do apologize for bothering again and again with the same issue, 
but I do not have any other choice left. My application is a multi-segment 
application. I am trying to integrate a third party TTS engine with it. I 
have included the header file that defines the prototypes for the TTS's 
shared library. However, When I try to make my application in CodeWarrior, 
Codewarrior results in linking error (...undefined) for the referring of 
some (not all) of those shared library functions. Any insight why that is 
happening? If I just comment out those erroneous function references (to 
avoid the link error), everything gets back to normal, and the prc file 
runs just fine (and the other function references to the shared library 
woks smoothly). Unfortunately I do need to use the functions I am having 
the linking error with. Any insight would be greatly appreciated. Can that 
somehow be related to code segmentation issue?  Am I missing any settings 
in codewarrior?
The provider of the shared library should have provided a header file that 
defines all of the entry points to the shared library using trap calls.  If 
they didn't provide that, then you don't have a valid interface.  If 
CodeWarrior is complaining about linking, then you're not using the shared 
library correctly, since shared library functions aren't linked into an 
executable -- they're defined the same way system calls are defined, using 
macros that expand into traps.

-- Ben Combee, Senior Software Engineer, palmOne, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Forum Archives:   http://news.palmos.com/read/all_forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/


Re: Link Error : PalmRez Error: tbmf 1000 has no bitmaps. Compilation halted

2005-01-12 Thread Ben Combee
At 03:27 AM 1/12/2005, you wrote:
I was working on Codewarrior 7.0 and recently tried the demo verion of 8.0 
to compile my earlier project which was working fine. However I am not 
able to progress due to the above mentioned link error. The bitmap which 
it is referring to is also ok. I found the dlls with the following 
mentioned versions:-
PalmRezPostLinker.dll - 4.5.3.0
PPalmRez.dll - 4.5.2.0
  Is my problem related to these dlls? If so, where to get the 
appropriate versions? If not, how to remove the link error??
The problem is related to the file size limitations of the demo V8 -- the 
linker is limited to very small programs (under 4K of code, under 13K of 
resources), so it's outputting a truncated set of resources, and PalmRez is 
complaining about that.

To get the non-demo version, you'll need to buy a copy of CW for Palm OS V9.
-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Forum Archives:   http://news.palmos.com/read/all_forums/

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


re: Link Error : PalmRez Error: tbmf 1000 has no bitmaps. Compilation halted

2005-01-12 Thread vidya
I was able to link it after deleting the bitmap and creating newly.
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/


Re: Link error

2004-11-18 Thread Ben Combee
At 12:03 PM 11/18/2004, you wrote:
I am not sure about the runtime, but POL should be ordinary application code
and as such should be movable. Try and see... Nothing worse than a crash can
happen. (More severe criteria are applied when the app is e.g. receiving
some data - in this case it is launched as a subroutine with only 1 segment
and the complete path must be in this segment.)
POL is an application framework, and your PilotMain (generated from one of 
POL's macros) directly calls code in POLLib1D.lib to figure out how to 
handle different launch codes.  The other POL libraries don't have to be in 
the first segment, but this one does.

Of course, the runtime always has to be in the first segment.  It's the got 
raw entry point for your program in it, as well as the code that locks 
other segments down.

-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Fourm Archives:   http://news.palmos.com/read/all_forums/

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


Re: Link error - fixed!

2004-11-18 Thread Mark Chauvin
Well, I fixed it.  Ben, I was able to move the C++
library to segment 4.  I'd already moved all extra
code out of the CPalmApp object into a "utilities"
module instead.  What made the biggest difference was
moving POLD1 to the bottom of segment 1 instead of the
top.  That apparently made the jumps shorter to get to
it.  Now it'll compile & link, but more importantly, I
can install it onto my Palm without a fatal exception.

Thanks again everyone for the help.

-Mark

--- Ben Combee <[EMAIL PROTECTED]> wrote:

> At 11:25 AM 11/18/2004, you wrote:
> >Can I move any of these files out of segment 1?
> >
> >I thought I read that you have to have some (or
> all)
> >of these in the first segment or it'll crash your
> Palm
> >when you try to install the program.
> 
> - Palm OS Runtime.mcp
> - POL Lib.mcp
> 
> The .mcp files don't contribute code to the segment,
> so they can be anywhere.
> 
> - PalmOS Runtime_21_A5.lib
> - MSL_C++_PalmOS_2i_DbA4A5.lib
> - POLD1.lib
> 
> You may be able to move the C++ library file to
> another segment, but the 
> runtime and POLD1 libraries have to be in the first
> segment.
> 
> - Starter.cpp
> - StarterApp.cpp
> 
> These need to be in segment 1, as they hold code
> that's called in every 
> launch code.  However, you may have code in these
> files that you can split 
> into other source files and move to other segments.
> 
> -- Ben Combee, Technical Lead, Developer Services,
> PalmSource, Inc.
> "Combee on Palm OS" weblog:
> http://palmos.combee.net/
> Developer Fourm Archives:  
> http://news.palmos.com/read/all_forums/
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
> 


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


Re: Link error

2004-11-18 Thread Logan Shaw
Robert Moynihan wrote:

> Mark Chauvin wrote:
> 
>> it doesn't
>> seem to show any overcrowded segments, assuming 68K is
>> the limit:
>>
>> Segment 1 47518 bytes
>> Segment 2 19768 bytes
>> Segment 3 16678 bytes
>> Segment 4 10628 bytes
>> Segment 5 16786 bytes
>> Segment 6 29814 bytes
>> Segment 7 28428 bytes

> The segments can be 64k in size, but you cannot jump with an Int32
> relative reference more than +/-32k, so you need to keep the segments
> <32k.

Or, if you wish to have segments larger than 32k, there is another
trick that sometimes works:  put the commonly-called stuff (like
libraries and C++ runtime) in the middle of the segment.  If a
piece of code is in the exact middle, then a since 16-bit signed
offset can reach 32k either way, that piece of code in the middle
will be accessible by everything in the segment.  Of course, not
all code can go in the exact middle (only one instruction can),
so it's sort of a continuum.  But if you are willing to spend a
few minutes, you can often easily cram way more than 32k into
a segment without using the smart code model.

  - Logan

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


Re: Link error

2004-11-18 Thread Ben Combee
At 11:25 AM 11/18/2004, you wrote:
Can I move any of these files out of segment 1?
I thought I read that you have to have some (or all)
of these in the first segment or it'll crash your Palm
when you try to install the program.
- Palm OS Runtime.mcp
- POL Lib.mcp
The .mcp files don't contribute code to the segment, so they can be anywhere.
- PalmOS Runtime_21_A5.lib
- MSL_C++_PalmOS_2i_DbA4A5.lib
- POLD1.lib
You may be able to move the C++ library file to another segment, but the 
runtime and POLD1 libraries have to be in the first segment.

- Starter.cpp
- StarterApp.cpp
These need to be in segment 1, as they hold code that's called in every 
launch code.  However, you may have code in these files that you can split 
into other source files and move to other segments.

-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Fourm Archives:   http://news.palmos.com/read/all_forums/

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


Re: Link error

2004-11-18 Thread Jan Slodicka
> I keep getting this 16-bit code reference error

Robert will be right - this really points to the references that are too far
apart.

> I thought I read that you have to have some (or all)
> of these in the first segment or it'll crash your Palm
> when you try to install the program.

I am not sure about the runtime, but POL should be ordinary application code
and as such should be movable. Try and see... Nothing worse than a crash can
happen. (More severe criteria are applied when the app is e.g. receiving
some data - in this case it is launched as a subroutine with only 1 segment
and the complete path must be in this segment.)

The other thing that might help is changing the order of the files in the
segment. This can bring the relevant parts of the code closer together.

Or use another code model. You probably use small model - that is a subject
of more severe limitations. We use to use smart code model (CW terminology)
and most of the segments are filled very close to 64K without any problem.

Jan Slodicka



- Original Message - 
From: "Mark Chauvin" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 6:25 PM
Subject: Re: Link error


> Robert,
>
> Can I move any of these files out of segment 1?
>
> Palm OS Runtime.mcp
> PalmOS Runtime_21_A5.lib
> MSL_C++_PalmOS_2i_DbA4A5.lib
> POLD1.lib
> Starter.cpp
> StarterApp.cpp
> POL Lib.mcp
>
> I thought I read that you have to have some (or all)
> of these in the first segment or it'll crash your Palm
> when you try to install the program.
>
> Thanks for the help everyone, btw.  I really
> appreciate the help.  I'm about to go nuts trying to
> get this program linked & installed.
>
> -Mark
>
>
> --- Robert Moynihan <[EMAIL PROTECTED]> wrote:
>
> > Mark Chauvin wrote:
> >
> > >Jan,
> > >
> > >Having never seen a map file before this morning
> > >(never needed to look), I'm no expert, but it
> > doesn't
> > >seem to show any overcrowded segments, assuming 68K
> > is
> > >the limit:
> > >
> > >Segment 1 47518 bytes
> > >Segment 2 19768 bytes
> > >Segment 3 16678 bytes
> > >Segment 4 10628 bytes
> > >Segment 5 16786 bytes
> > >Segment 6 29814 bytes
> > >Segment 7 28428 bytes
> > >
> > >
> > >
> > The segments can be 64k in size, but you cannot jump
> > with an Int32
> > relative reference more than +/-32k, so you need to
> > keep the segments
> > <32k.  Bob.
> >
> > -- 
> > For information on using the Palm Developer Forums,
> > or to unsubscribe, please see
> > http://www.palmos.com/dev/support/forums/
> >
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


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


Re: Link error

2004-11-18 Thread Mark Chauvin
Robert,

Can I move any of these files out of segment 1?

Palm OS Runtime.mcp
PalmOS Runtime_21_A5.lib
MSL_C++_PalmOS_2i_DbA4A5.lib
POLD1.lib
Starter.cpp
StarterApp.cpp
POL Lib.mcp

I thought I read that you have to have some (or all)
of these in the first segment or it'll crash your Palm
when you try to install the program.

Thanks for the help everyone, btw.  I really
appreciate the help.  I'm about to go nuts trying to
get this program linked & installed.

-Mark


--- Robert Moynihan <[EMAIL PROTECTED]> wrote:

> Mark Chauvin wrote:
> 
> >Jan,
> >
> >Having never seen a map file before this morning
> >(never needed to look), I'm no expert, but it
> doesn't
> >seem to show any overcrowded segments, assuming 68K
> is
> >the limit:
> >
> >Segment 1 47518 bytes
> >Segment 2 19768 bytes
> >Segment 3 16678 bytes
> >Segment 4 10628 bytes
> >Segment 5 16786 bytes
> >Segment 6 29814 bytes
> >Segment 7 28428 bytes
> >
> >  
> >
> The segments can be 64k in size, but you cannot jump
> with an Int32 
> relative reference more than +/-32k, so you need to
> keep the segments 
> <32k.  Bob.
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
> 


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


Re: Link error

2004-11-18 Thread Robert Moynihan
Mark Chauvin wrote:
Jan,
Having never seen a map file before this morning
(never needed to look), I'm no expert, but it doesn't
seem to show any overcrowded segments, assuming 68K is
the limit:
Segment 1 47518 bytes
Segment 2 19768 bytes
Segment 3 16678 bytes
Segment 4 10628 bytes
Segment 5 16786 bytes
Segment 6 29814 bytes
Segment 7 28428 bytes
 

The segments can be 64k in size, but you cannot jump with an Int32 
relative reference more than +/-32k, so you need to keep the segments 
<32k.  Bob.

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


Re: Link error

2004-11-18 Thread Mark Chauvin
Jan,

Having never seen a map file before this morning
(never needed to look), I'm no expert, but it doesn't
seem to show any overcrowded segments, assuming 68K is
the limit:

Segment 1 47518 bytes
Segment 2 19768 bytes
Segment 3 16678 bytes
Segment 4 10628 bytes
Segment 5 16786 bytes
Segment 6 29814 bytes
Segment 7 28428 bytes

The POL files are all in segments 1-4
My project cpp files are in segments 5-7

It also shows this:

Data section below A5: 5796 bytes
Data section below A5: 314 bytes

-Mark


--- Jan Slodicka <[EMAIL PROTECTED]> wrote:

> Map file contains complete information.
> 
> Jan Slodicka


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


Re: Link error

2004-11-18 Thread Jan Slodicka
Map file contains complete information.

Jan Slodicka

- Original Message - 
From: "Mark Chauvin" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 3:31 PM
Subject: Re: Link error


> How can I tell which segment is overcrowded?  I was
> thinking it's probably the first segment, based on the
> error message, but I've taken all my cpp files out of
> there & reduced the starterapp.cpp file down as much
> as I can.
>
> --- "tut.by" <[EMAIL PROTECTED]> wrote:
>
> > try move your cpp files to another segment (to first
> > for example).
> > this error mean in your project placed overcrowded
> > segment. you can
> > will comment code in different files until your link
> > error is not
> > disappear. if you discover the problematically file
> > then will move him
> > to another segment.
> >
> > MC> Link Error   : POLExplicitTemplates.cpp:
> > MC> 'POL::CArray > MC> POL::CObjectTraits,
> >
> > MC>
> >
> POL::CCompareTraits>::~CArray()'
> > 16-bit code
> > MC> reference to 'operator delete(void*)' is out of
> > range.
> >
> > MC> There's about 10 of these that happen when I try
> > to compile & link.  This is
> > MC> with codewarrior 9.3, and the program is written
> > in POL.  I've got 6
> > MC> segments.  Segment 1 contains:
> >
> > MC> Palm OS Runtime.mcp
> > MC> PalmOS Runtime_21_A5.lib
> > MC> MSL_C++_PalmOS_2i_DbA4A5.lib
> > MC> POLD1.lib
> > MC> Starter.cpp
> > MC> StarterApp.cpp
> > MC> POL Lib.mcp
> >
> > MC> Segements 2, 3 & 4 contain POLD2, POLD3 and
> > POLD4.lib, respectivey.
> > MC> Then I have my .cpp files (forms & utilities) in
> > segments 5 & 6.  I've tried
> > MC> rearraging things and using different options in
> > the project, and I'm about
> > MC> to give up.  If I weren't so boneheaded and
> > stupid maybe I'd see what's
> > MC> probably a very simple solution.  Can someone
> > help me?
> >
> > MC> Thanks.
> > MC> -Mark
> >
> >
> > -- 
> > For information on using the Palm Developer Forums,
> > or to unsubscribe, please see
> > http://www.palmos.com/dev/support/forums/
> >
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


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


Re: Link error

2004-11-18 Thread Mark Chauvin
How can I tell which segment is overcrowded?  I was
thinking it's probably the first segment, based on the
error message, but I've taken all my cpp files out of
there & reduced the starterapp.cpp file down as much
as I can.

--- "tut.by" <[EMAIL PROTECTED]> wrote:

> try move your cpp files to another segment (to first
> for example).
> this error mean in your project placed overcrowded
> segment. you can
> will comment code in different files until your link
> error is not
> disappear. if you discover the problematically file
> then will move him
> to another segment.
> 
> MC> Link Error   : POLExplicitTemplates.cpp: 
> MC> 'POL::CArray MC> POL::CObjectTraits,
> 
> MC>
>
POL::CCompareTraits>::~CArray()'
> 16-bit code 
> MC> reference to 'operator delete(void*)' is out of
> range.
> 
> MC> There's about 10 of these that happen when I try
> to compile & link.  This is 
> MC> with codewarrior 9.3, and the program is written
> in POL.  I've got 6 
> MC> segments.  Segment 1 contains:
> 
> MC> Palm OS Runtime.mcp
> MC> PalmOS Runtime_21_A5.lib
> MC> MSL_C++_PalmOS_2i_DbA4A5.lib
> MC> POLD1.lib
> MC> Starter.cpp
> MC> StarterApp.cpp
> MC> POL Lib.mcp
> 
> MC> Segements 2, 3 & 4 contain POLD2, POLD3 and
> POLD4.lib, respectivey.
> MC> Then I have my .cpp files (forms & utilities) in
> segments 5 & 6.  I've tried 
> MC> rearraging things and using different options in
> the project, and I'm about 
> MC> to give up.  If I weren't so boneheaded and
> stupid maybe I'd see what's 
> MC> probably a very simple solution.  Can someone
> help me?
> 
> MC> Thanks.
> MC> -Mark
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
> 


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


Re: Link error

2004-11-18 Thread tut.by
try move your cpp files to another segment (to first for example).
this error mean in your project placed overcrowded segment. you can
will comment code in different files until your link error is not
disappear. if you discover the problematically file then will move him
to another segment.

MC> Link Error   : POLExplicitTemplates.cpp: 
MC> 'POL::CArray POL::CObjectTraits, 
MC> POL::CCompareTraits>::~CArray()' 16-bit code 
MC> reference to 'operator delete(void*)' is out of range.

MC> There's about 10 of these that happen when I try to compile & link.  This 
is 
MC> with codewarrior 9.3, and the program is written in POL.  I've got 6 
MC> segments.  Segment 1 contains:

MC> Palm OS Runtime.mcp
MC> PalmOS Runtime_21_A5.lib
MC> MSL_C++_PalmOS_2i_DbA4A5.lib
MC> POLD1.lib
MC> Starter.cpp
MC> StarterApp.cpp
MC> POL Lib.mcp

MC> Segements 2, 3 & 4 contain POLD2, POLD3 and POLD4.lib, respectivey.
MC> Then I have my .cpp files (forms & utilities) in segments 5 & 6.  I've 
tried 
MC> rearraging things and using different options in the project, and I'm about 
MC> to give up.  If I weren't so boneheaded and stupid maybe I'd see what's 
MC> probably a very simple solution.  Can someone help me?

MC> Thanks.
MC> -Mark


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


re: Link error in separate files!!!

2004-08-10 Thread Randy Poublon
Try

extern void ConsultaTableFormInit(FormType *form); //,UInt16 recordNumber);
extern Boolean ConsultaFormHandleEvent(EventType * eventP); <--Here
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Link error in separate files!!!

2004-08-10 Thread Gláucio Barizon Pançardes
You are really total certain!

Debtor!


> Is it to do with the functions being declared static so not available to
other files?
>



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


Re: Link error in separate files!!!

2004-08-10 Thread Ray
Is it to do with the functions being declared static so not available to other files?
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Link error in separate files!!!

2004-08-10 Thread Gláucio Barizon Pançardes
First, debtor for the attention!!!

But my project already has the implementations, for example: ConsultaForm.c
already is in my project.

and i dont have compile error, only link.
When I compel main.c I  do not have error, only when F7 squeeze (link)

"Krzysztof Kowalczyk" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
On Tue, 10 Aug 2004 09:02:57 -0300, Gláucio Barizon Pançardes
<[EMAIL PROTECTED]> wrote:
> I am trying to use my separate code in varios archives for one better
> understanding, but when I bind in codewarrior 8,0 of the following o
error:
>
> Link Error   : Main.c: 'OpenOrCreateDB' referenced from 'AppStart' is
> undefined.
>
> Link Error   : Main.c: 'MainFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
>
> Link Error   : Main.c: 'CadastroFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
>
> Link Error   : Main.c: 'ConsultaFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
>
> Link Error   : Main.c: 'ConsultaViewFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
>
> But, in my main.c have all the lib_name.h with my prototypes, like:
>
> #include "ConsultaFormH.h"
>
> and inside of ConsultaFormH.h have
>
> static void ConsultaTableFormInit(FormType *form); //,UInt16
recordNumber);
> static Boolean ConsultaFormHandleEvent(EventType * eventP);
<--Here
>
> What I am making of made a mistake? The events cannot be in separate
> archives?

Including .h file is not enough. .h file provides a prototype of the
function which is enough for the *compiler* to compile the code using
the function.

What you get is an error from the *linker* which complains that the
function hasn't been defined anywhere.

The bottom line: find a *.c source file that implements
ConsultaFormHandleEvent etc. and add it to CodeWarrior project. That
should fix the problem.

Krzysztof Kowalczyk | http://blog.kowalczyk.info



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


Re: Link error in separate files!!!

2004-08-10 Thread Krzysztof Kowalczyk
On Tue, 10 Aug 2004 09:02:57 -0300, Gláucio Barizon Pançardes
<[EMAIL PROTECTED]> wrote:
> I am trying to use my separate code in varios archives for one better
> understanding, but when I bind in codewarrior 8,0 of the following o error:
> 
> Link Error   : Main.c: 'OpenOrCreateDB' referenced from 'AppStart' is
> undefined.
> 
> Link Error   : Main.c: 'MainFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
> 
> Link Error   : Main.c: 'CadastroFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
> 
> Link Error   : Main.c: 'ConsultaFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
> 
> Link Error   : Main.c: 'ConsultaViewFormHandleEvent' referenced from
> 'AppHandleEvent' is undefined.
> 
> But, in my main.c have all the lib_name.h with my prototypes, like:
> 
> #include "ConsultaFormH.h"
> 
> and inside of ConsultaFormH.h have
> 
> static void ConsultaTableFormInit(FormType *form); //,UInt16 recordNumber);
> static Boolean ConsultaFormHandleEvent(EventType * eventP);  <--Here
> 
> What I am making of made a mistake? The events cannot be in separate
> archives?

Including .h file is not enough. .h file provides a prototype of the
function which is enough for the *compiler* to compile the code using
the function.

What you get is an error from the *linker* which complains that the
function hasn't been defined anywhere.

The bottom line: find a *.c source file that implements
ConsultaFormHandleEvent etc. and add it to CodeWarrior project. That
should fix the problem.

Krzysztof Kowalczyk | http://blog.kowalczyk.info

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


Re: Link error : 'AppHandleEvent' 16 bit code reference to 'CntPlasmFormHandleEvent' is out of range

2004-05-24 Thread Frédéric Dessallien
Thanks tim,
I have succesfully convert the application to multi segment and it's quite
easy to do.
For those who encounter this problem just create a new target copied from
existant
and change the PalmOs library to the good one.(see metrowerks or palmos
documentation for library).
Add a segment and  reorganize your segments.
Change option link single libary and it's ok.

Regards


"Tim Kostka" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> It sounds like your code is getting too big for one segment.  You
basically
> have two options:  rewrite your code each time you want to add something,
or
> create a multi-segment application.  The latter is actually quite easy and
> you should be able to find lots of examples should you need them.  It may
> take some time to divide your current source file into smaller files, but
> it'll get rid of that linking error and allow for easier code additions.
> --
> Tim Kostka
> http://www.nuprograms.com
>
>
> "Frédéric Dessallien" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello,
> > I am writting my first c code warrior application  and i
> > encountered this problem at compilation :
> > Link error : 'AppHandleEvent' 16 bit code reference to
> > 'CntPlasmMTFormHandleEvent' is out of range
> >
> > I think i have got too much forms in my application but i have seen
other
> > applications with much more forms.
> > (if i comment one form handle event compilation is ok)
> >
> > I call 20 different forms (calcul forms) in this application which have
> > different presentation and building forms on the fly
> > would be too hard for this time .
> > Single Segment of application is 35 ko.
> >
> > Is someone know the right explication of this link error and (or) have
a
> > solution ?
> >
> > Code :---
> > static Boolean AppHandleEvent(EventPtr event)
> > {
> >   UInt16 formId;
> >   FormPtr form;
> >
> >   if (event->eType == frmLoadEvent) {
> > // Load the form resource.
> > formId = event->data.frmLoad.formID;
> > form = FrmInitForm(formId);
> > ErrFatalDisplayIf(!form , "Can't initialize form");
> > FrmSetActiveForm(form);
> > //utility
> >
> > // Set the event handler for the form.  The handler of the currently
> > // active form is called by FrmHandleEvent each time is receives an
> > // event.
> > switch (formId) {
> >
> > case MainForm :
> >   //gActiveForm = MainForm ;
> >   FrmSetEventHandler(form, MainFormHandleEvent);
> >   break;
> >
> >
> > case MenuForm :
> >   //gActiveForm = MenuForm ;
> >  FrmSetEventHandler(form, MenuFormHandleEvent);
> >  FrmSetGadgetHandler(form,
> >  FrmGetObjectIndex(form,GAD_MFORM ),
> >  TestGadgetHandler);
> >break;
> >
> >
> > [ etc ]
> >
> > case CNTPMTFORM :
> >  FrmSetEventHandler(form ,CntPlasmMTFormHandleEvent);
> >  FrmSetGadgetHandler(form,
> >   FrmGetObjectIndex(form,GAD_CNTPMT),
> > TestGadgetHandler);
> >  break ;
> > -
> > (Sorry for my poor english).
> >
> > Thanks
> >
> > fred
> >
> >
> >
>
>
>




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


Re: Link error : 'AppHandleEvent' 16 bit code reference to 'CntPlasmFormHandleEvent' is out of range

2004-05-21 Thread Tim Kostka
It sounds like your code is getting too big for one segment.  You basically
have two options:  rewrite your code each time you want to add something, or
create a multi-segment application.  The latter is actually quite easy and
you should be able to find lots of examples should you need them.  It may
take some time to divide your current source file into smaller files, but
it'll get rid of that linking error and allow for easier code additions.
-- 
Tim Kostka
http://www.nuprograms.com


"Frédéric Dessallien" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
> I am writting my first c code warrior application  and i
> encountered this problem at compilation :
> Link error : 'AppHandleEvent' 16 bit code reference to
> 'CntPlasmMTFormHandleEvent' is out of range
>
> I think i have got too much forms in my application but i have seen other
> applications with much more forms.
> (if i comment one form handle event compilation is ok)
>
> I call 20 different forms (calcul forms) in this application which have
> different presentation and building forms on the fly
> would be too hard for this time .
> Single Segment of application is 35 ko.
>
> Is someone know the right explication of this link error and (or) have  a
> solution ?
>
> Code :---
> static Boolean AppHandleEvent(EventPtr event)
> {
>   UInt16 formId;
>   FormPtr form;
>
>   if (event->eType == frmLoadEvent) {
> // Load the form resource.
> formId = event->data.frmLoad.formID;
> form = FrmInitForm(formId);
> ErrFatalDisplayIf(!form , "Can't initialize form");
> FrmSetActiveForm(form);
> //utility
>
> // Set the event handler for the form.  The handler of the currently
> // active form is called by FrmHandleEvent each time is receives an
> // event.
> switch (formId) {
>
> case MainForm :
>   //gActiveForm = MainForm ;
>   FrmSetEventHandler(form, MainFormHandleEvent);
>   break;
>
>
> case MenuForm :
>   //gActiveForm = MenuForm ;
>  FrmSetEventHandler(form, MenuFormHandleEvent);
>  FrmSetGadgetHandler(form,
>  FrmGetObjectIndex(form,GAD_MFORM ),
>  TestGadgetHandler);
>break;
>
>
> [ etc ]
>
> case CNTPMTFORM :
>  FrmSetEventHandler(form ,CntPlasmMTFormHandleEvent);
>  FrmSetGadgetHandler(form,
>   FrmGetObjectIndex(form,GAD_CNTPMT),
> TestGadgetHandler);
>  break ;
> -
> (Sorry for my poor english).
>
> Thanks
>
> fred
>
>
>



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


Re: Link Error : __RuntimeModule__: '__Startup__' referenced from '__DummyStartup__' is undefined.

2004-05-14 Thread Ben Combee
At 01:49 AM 5/14/2004, you wrote:
I am trying to link a really simple Palm aplication with the demo version 
of CW 8.

I got the error message
Link Error   : Exception68K.cp: '__rethrow' referenced from '__unexpected' 
is undefined.

After turning off the "Use C++ Exceptions" checkbox in the C/C++ Language 
panel I get a new link error.
Link Error   : __RuntimeModule__: '__Startup__' referenced from 
'__DummyStartup__' is undefined.

I have tried to turne all checkboxes in this panel off but it does not work.
This is an indication that either you're missing the StartupCode.lib file 
from your project, or that your project has exceeded the maximum size for a 
demo program.  The limits are very small -- you should be able to make a 
simple app from the wizard, but you won't be able to build real programs.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   Read "Combee on Palm OS" at http://palmos.combee.net/


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


Re: "Link error, object already defined" on project make in codewarrior

2004-05-06 Thread Matt Graham
MarkW wrote:
This may be a C question rather than a CW problem (I'm kinda new to both),
but here goes. I have one header file, MyApp.h, a C source file called
MyApp.c, and one called Main.c to handle main form events. I #include the
header file in both C files. When I MAKE the project, I get error messages
stating the global variables in the header file are already defined in the
MyApp.c file. What have I done wrong?
Declare your globals in the header using the extern keyword.
extern int MyInt;

Define your globals once in one .c file.
int MyInt;
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Link error trying to use Mathlib

2004-03-07 Thread RVRoadie
Thanks, that solved the link error.

When I created my app, I selected the C++ application wizard. Just assumed
that was the right selection. I am too new at this to know the difference.


"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 10:24 AM 3/7/2004, you wrote:
> >I just created a Test app using the CW 9.3 wizard, and included mathlib.
> >
> >Added these two lines:
> >
> >  double x, y=2;
> >  x = pow(y, 2);
> >
> >Get this error on make:
> >
> >Link Error   : Test.cpp: 'pow(double,double)' referenced from
> >'MainFormInit(FormType*)' is undefined.
> >Project: Test.mcp, Target: Debug
>
> The key is "pow(double, double)".  My guess is that you build a C++ test
> app.  If so, you need to surround the #include of "MathLib.h" with
>
> extern "C" {
>  #include "MathLib.h"
> }
>
> Without that, the compiler will interpret the prototypes as being for C++
> functions with name mangling, rather than C functions without.
>
>
> -- Ben Combee, senior DTS engineer, PalmSource, Inc.
> Read "Combee on Palm OS" at http://palmos.combee.net/
>
>
>



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


Re: Link error trying to use Mathlib

2004-03-07 Thread Ben Combee
At 10:24 AM 3/7/2004, you wrote:
I just created a Test app using the CW 9.3 wizard, and included mathlib.

Added these two lines:

 double x, y=2;
 x = pow(y, 2);
Get this error on make:

Link Error   : Test.cpp: 'pow(double,double)' referenced from
'MainFormInit(FormType*)' is undefined.
Project: Test.mcp, Target: Debug
The key is "pow(double, double)".  My guess is that you build a C++ test 
app.  If so, you need to surround the #include of "MathLib.h" with

extern "C" {
#include "MathLib.h"
}
Without that, the compiler will interpret the prototypes as being for C++ 
functions with name mangling, rather than C functions without.

-- Ben Combee, senior DTS engineer, PalmSource, Inc.
   Read "Combee on Palm OS" at http://palmos.combee.net/


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


Re: Link error trying to use Mathlib

2004-03-07 Thread RVRoadie
I just created a Test app using the CW 9.3 wizard, and included mathlib.

Added these two lines:

 double x, y=2;
 x = pow(y, 2);

Get this error on make:

Link Error   : Test.cpp: 'pow(double,double)' referenced from
'MainFormInit(FormType*)' is undefined.
Project: Test.mcp, Target: Debug

If I copy the pow wrap from mathlib.c into my program, and rename pow to
powT, it works fine and link error goes away.

I have a sample app from Garmin that used mathlib. I can add the pow
functing to that with no link error.

The only difference I can find is that the mathlin.c code size in the
project tree for the Test app is 2002, and for the Garmin app it is 2392.
Don't know what that means.

Except for the handspring mathlib.c, I don't have any other on my computer.




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


Re: Link error trying to use Mathlib

2004-03-05 Thread Ben Combee
At 09:53 PM 3/5/2004, you wrote:
I still don't get it. The following works fine:

 MathLibPow(MathLibRef, (lon1 - lon2), 2, &d1);
 MathLibPow(MathLibRef, (lat1 - lat2), 2, &d2);
 MathLibSqrt(MathLibRef, (d1 + d2), &d3);
 d = e * d3;
This gets the link error:

d =  e * sqrt(pow(lon1 - lon2, 2) + pow(lat1 - lat2, 2));

If I copy these items from mathlib.c into my program, link error goes away.

double pow(double x, double y) {
 double result;
 MathLibPow(MathLibRef, x, y, &result);
 return result;
}
double sqrt(double x) {
 double result;
 MathLibSqrt(MathLibRef, x, &result);
 return result;
}
What am I missing?
Nothing.  mathlib.c is a file that is supposed to be added to your 
application and serves as a local wrapper of the shared library 
functions.  I don't know what tools you are using, but if you're on 
CodeWarrior for Palm OS, and you use the wizard to build a new app that 
uses MathLib, you'll see that MathLib.c is part of the new project that's 
created.

-- Ben Combee, senior DTS engineer, PalmSource, Inc.
   Read "Combee on Palm OS" at http://palmos.combee.net/


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


Re: Link error trying to use Mathlib

2004-03-05 Thread RVRoadie
I still don't get it. The following works fine:

 MathLibPow(MathLibRef, (lon1 - lon2), 2, &d1);
 MathLibPow(MathLibRef, (lat1 - lat2), 2, &d2);
 MathLibSqrt(MathLibRef, (d1 + d2), &d3);
 d = e * d3;

This gets the link error:

d =  e * sqrt(pow(lon1 - lon2, 2) + pow(lat1 - lat2, 2));

If I copy these items from mathlib.c into my program, link error goes away.

double pow(double x, double y) {
 double result;
 MathLibPow(MathLibRef, x, y, &result);
 return result;
}

double sqrt(double x) {
 double result;
 MathLibSqrt(MathLibRef, x, &result);
 return result;
}

What am I missing?


"RVRoadie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I get a link error saying pow and sqrt are undefined.
>
> I have a sample app from Garmin that uses Mathlib, and I can add these
> functions with no link error.
>
> I have mathlib.h included, mathlib.c in the project tree. Open and
> registration functions work fine. What am I missing?
>
> Thanks
>
>
>



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


RE: Link Error : StartupCode.c: Illegal object data

2004-03-05 Thread Colin MacKenzie
>Dave Lippincott wrote:
>>Right now I have CW 8 (with updates), Palm OS SDK 5.x and the latest
>>Satforms.  No problems writing or modifying extensions.

>Matt Graham wrote:
>>That doesn't sound right.  I haven't done an SF extension for a year or 
>>so, but I never had any problems like that.  And I'm almost positive I 
>>wrote one for SF 4.1 and I _am_ positive I wrote several using CW 6 and 
>>both 3.5 and 4.0 SDKs.

> Ben Combee wrote:
> 
>>Yes, it is a demo restriction.  The CW V8 demo can only produce very small

>>PRC files and can only build applications.  It also won't link with any 
>>runtime libraries other than the one that ships with the demo.

I am using SatForms 5.2.3 and I just bought CW9. My extension worked first
time (Well it did after I put the correct file name in the .inf file)
:-)

Colin

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


Re: Link Error : StartupCode.c: Illegal object data

2004-03-03 Thread Dave Lippincott
Right now I have CW 8 (with updates), Palm OS SDK 5.x and the latest
Satforms.  No problems writing or modifying extensions.

- Original Message - 
From: "Colin MacKenzie" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 12:52 PM
Subject: RE: Link Error : StartupCode.c: Illegal object data


> Ben Combee wrote:
> >Yes, it is a demo restriction.  The CW V8 demo can only produce very
small
> >PRC files and can only build applications.  It also won't link with any
> >runtime libraries other than the one that ships with the demo.
>
> If it's only a demo restriction I would buy Codewarrior so that I could
> write my extension but I got the following information from a Satellite
> Forms forum:
>
> >You have to use the following combination:
>
> >1. Code Warrior 5 (or one that supports Palm SDK 3.1)
> >2. Satellite forms 4.0 (not 4.1 or greater, just 4.0)
> >3. Remove all traces of the above software components
> >from your PC before installing (Including registry
> >entries.
> >4. Install CW first.
> >5. Install SDK 3.1
> >6. Install SF
> >7. Keep fingers crossed throught the process cos
> >neither Pumatech nor Metrowerks will offer any support
> >on this issue, and if the functions you want to use
> >are not in SDK 3.1 then you're screwed. Sorry! that is
> >all the help I can offer.
> >
> >If you find any way to use a higher SDK, share the
> >info would be apreciated.
>
> If this is true, it does not sound viable. Can anyone else advise?
>
> Colin
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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


Re: Link Error : StartupCode.c: Illegal object data

2004-03-03 Thread Matt Graham
Colin MacKenzie wrote:
Ben Combee wrote:

Yes, it is a demo restriction.  The CW V8 demo can only produce very small 
PRC files and can only build applications.  It also won't link with any 
runtime libraries other than the one that ships with the demo.


If it's only a demo restriction I would buy Codewarrior so that I could
write my extension but I got the following information from a Satellite
Forms forum:
[ CW, SF problems ]
That doesn't sound right.  I haven't done an SF extension for a year or 
so, but I never had any problems like that.  And I'm almost positive I 
wrote one for SF 4.1 and I _am_ positive I wrote several using CW 6 and 
both 3.5 and 4.0 SDKs.  Of course, like Palm and Satellite Forms, I will 
offer no support or guarantees that it will work for you.

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


RE: Link Error : StartupCode.c: Illegal object data

2004-03-03 Thread Colin MacKenzie
Ben Combee wrote:
>Yes, it is a demo restriction.  The CW V8 demo can only produce very small 
>PRC files and can only build applications.  It also won't link with any 
>runtime libraries other than the one that ships with the demo.

If it's only a demo restriction I would buy Codewarrior so that I could
write my extension but I got the following information from a Satellite
Forms forum:

>You have to use the following combination:

>1. Code Warrior 5 (or one that supports Palm SDK 3.1)
>2. Satellite forms 4.0 (not 4.1 or greater, just 4.0)
>3. Remove all traces of the above software components
>from your PC before installing (Including registry
>entries.
>4. Install CW first.
>5. Install SDK 3.1
>6. Install SF
>7. Keep fingers crossed throught the process cos
>neither Pumatech nor Metrowerks will offer any support
>on this issue, and if the functions you want to use
>are not in SDK 3.1 then you're screwed. Sorry! that is
>all the help I can offer.
>
>If you find any way to use a higher SDK, share the
>info would be apreciated.

If this is true, it does not sound viable. Can anyone else advise?

Colin

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


Re: Link Error : StartupCode.c: Illegal object data

2004-03-02 Thread Ben Combee
At 09:20 AM 3/2/2004, you wrote:
I am trying to write an extension for Satellite Forms using the demo version
of codewarrior and when I tried to make my project I get the following
error:
Link Error : StartupCode.c: Illegal object data in 'StartupCode.c'.
Link Error : _RuntimeModule_: '_Startup_' referenced from '_DummyStartup_'
is undefined.
I have also tried to make the sample extensions supplied with Satellite
Forms, and I get the same error - so I don't think it's my code.
Any ideas what is going wrong? - could it be a limitation of the Demo
version? I want to build an extension successfully before I buy the full
version.
Yes, it is a demo restriction.  The CW V8 demo can only produce very small 
PRC files and can only build applications.  It also won't link with any 
runtime libraries other than the one that ships with the demo.

-- Ben Combee, senior DTS engineer, PalmSource, Inc.
   Read "Combee on Palm OS" at http://palmos.combee.net/


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


Re: Link Error???

2004-02-06 Thread Alexandre Barreto
I'm including then in both ways
usein #include and by adding the files to the project
if a mark the option use C++ compiler it compiles as C++ so i thiunk it 
works on the Lite
but i need to use theis classes in the file in #includeing then...

thnx

Ben Combee wrote:

At 06:19 AM 2/5/2004, you wrote:

hi Ben,
I tried to rename the files to .cpp and including then
but it is not compiling then using c++
so i get error in the class declaration.
any clues?


You're using the Light/Demo version.  That might not support C++; I 
don't remember about the limitations of something that old.

By "including" them, do you mean "#including" or adding to the 
project.  The first method is wrong, since the compilation type 
depending on the base source file.  If you add it to the project as a 
C++ file, it should build as C++, unless that's been disabled in the 
demo.



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


RE: Link Error???

2004-02-05 Thread Ben Combee
At 06:19 AM 2/5/2004, you wrote:
hi Ben,
I tried to rename the files to .cpp and including then
but it is not compiling then using c++
so i get error in the class declaration.
any clues?
You're using the Light/Demo version.  That might not support C++; I don't 
remember about the limitations of something that old.

By "including" them, do you mean "#including" or adding to the 
project.  The first method is wrong, since the compilation type depending 
on the base source file.  If you add it to the project as a C++ file, it 
should build as C++, unless that's been disabled in the demo.



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


RE: Link Error???

2004-02-05 Thread Alexandre Barreto
hi Ben,
I tried to rename the files to .cpp and including then
but it is not compiling then using c++
so i get error in the class declaration.
any clues?
thnx
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RE: Link Error???

2004-02-04 Thread Ben Combee
Don't use "activate C++" like that.  It really means "compile .c files as C++".  If 
your file has a .cpp extension, the compiler will always build it as C++.

-Original Message-
From:  Marcelo Henrique
Date:  2/4/04 10:54 am
To:  Palm Developer Forum
Subj:  Link Error???

Hello,

I have a friend that can't access de PD forum, so I'm writting by him.

He's proggraming on CW Lite and ever get this erro when he mark "Activate
C++ compile." option:

"Link Error : ftp.c: 'NetUTCPOpen(char*,char*,short)' referenced from
'CmdFTP(int,char**)'is undefined."

If this option doens't check it works fine.
But, he needs to compile using C++ cause he'll use some classes in the new
features

Thanks a lot.

Marcelo Henrique

_
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br


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


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


Re: Link Error: xxx unreferenced from yyy is undefined

2004-01-24 Thread Virendra
Seems like linker chap is not able to find the
"compiled" code for PINSetInputAreaState() funtion.

Most common reason for this is not setting the path.
Please set the path for the same and try again. (Dont
remember now but guess the path-setting is there in
the project settings (in CW) somewhere!)

-Viren

===

I'm trying to work with the Pen Input Manager
functions, and I can't seem to
get any of them to work.  I'm guessing the linker
can't find the library,
but I'm sure I downloaded it and installed it as the
example program
"SampleCollapse.mcp" works fine and I see no
difference between the code in
there and my code.  I'm out of ideas.  Anyone know
what the problem could
be?  Many thanks.


Link Error: collapse.c:  'PINSetInputAreaState'
referenced from
'collapseSetMode' is undefined


<<>>

#include 
#include 
...
Boolean collapseSetMode(UInt16 orientation) {
...
error = PINSetInputAreaState(pinInputAreaClosed);
...
}


=
"There is nothing good or bad, 
There is nothing happy or sad,
Only thinking makes it so!"
- William Shakespeare

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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


Re: link error?

2004-01-15 Thread Flex
You've placed too much code in the segment1? What to do:
1. Move some functions to other segment
2. Rearrange functions so that MultiSegOpen is "closer" to the top
3. Rearrange files in the "Segments" tab - place the one with this 
function iside at the top

palm os wrote:

When I link Debug_Segment1, there appears

'MultiSegDispatchTable' has illegal single segment 32-bit reference to
'MultiSegOpen'.
All Code_Segment link OK.

What's the reason?





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


Re: Link Error

2004-01-05 Thread Ben Combee
At 08:27 PM 1/4/2004, Edward P. Ross wrote:
On one of my targets I am getting a link error (see below).  I tried 
clearing out some of the temp folders/data but that did nothing.  Any 
ideas or do I need to delete and re-create it?

Link Error   : __RuntimeModule__: '__Startup__' referenced from 
'__DummyStartup__' is undefined.
This error indicates that you don't have a runtime library in your project, 
or if you do, it's not in the first segment of your application.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


RE: Link Error

2004-01-05 Thread Caspar Heiden, vd
Do you have one of the Palm OS Runtime libraries linked with your
project?

good luck,

Caspar

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Edward
P. Ross
Sent: Monday, January 05, 2004 2:28 AM
To: Palm Developer Forum
Subject: Link Error

On one of my targets I am getting a link error (see below).  I tried 
clearing out some of the temp folders/data but that did nothing.  Any 
ideas or do I need to delete and re-create it?

Link Error   : __RuntimeModule__: '__Startup__' referenced from 
'__DummyStartup__' is undefined.

Thanks,
Edward

-- 
Acrocat Software, L.L.C.
Do you workout?  Get Results.  Get PDAbs.
http://www.Acrocat.com/PDAbs



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

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


Re: Link Error: Main.c: 'AppHandleEvent' 16 bit code reference to 'SecondFormHandleEvent' is out of range

2003-11-26 Thread Matthew Henry
> Yes, you have to make your project a multi-segment app.
>

And might I suggest you do so by using
#pragma segment
instead of the segments tab.

I finally switched my whole app and all its libraries over to using #pragma
segment instead of the segment tag, and my life sucks less (much easier to
keep different targets in sync).



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


Re: Link Error: Main.c: 'AppHandleEvent' 16 bit code reference to 'SecondFormHandleEvent' is out of range

2003-11-26 Thread Horst Borscht
> Am I approaching a size limit (this 64K limit I hear about, I have only
been
> programming in Codewarrior for the last 2 months),
> or is it a different problem?
Yes, you have to make your project a multi-segment app.

Horst


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


Re: Link Error: PalmOS_Startup.cpp: '_Startup_' 16-bit code referance to 'PilotMain' is out of range

2003-11-18 Thread Ben Combee
At 08:02 AM 11/18/2003, Anders Rahm-Nilzon wrote:
Hi,

I get this linker error that I can't solve. I've tried to set the code model
to smart for the 68k processor in Code Generation but it didn't make this
error to go away :( Is there anoyone that's having a clue how I could solve
this problem ???
Rearrange your link order (segments tab) so that the file that implements 
PilotMain is in the first segment and is closer to the runtime library.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: Link Error: PalmOS_Startup.cpp: '_Startup_' 16-bit code referance to 'PilotMain' is out of range

2003-11-18 Thread Anders Rahm-Nilzon
THANK you SO much !!!
 \Anders R-N



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


Re: Link Error: PalmOS_Startup.cpp: '_Startup_' 16-bit code referance to 'PilotMain' is out of range

2003-11-18 Thread Dave Lippincott
I believe the your main routine needs to be in the first segment, try moving
it closer to the beginning of your source file.  Do you have a very large
function?  Try breaking it up or moving other routines around within your
project.  I usually break up my routines into different modules sorted by
function, keeping PilotMain in the first module near the beginning.

- Original Message - 
From: "Anders Rahm-Nilzon" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 9:02 AM
Subject: Link Error: PalmOS_Startup.cpp: '_Startup_' 16-bit code referance
to 'PilotMain' is out of range


> Hi,
>
> I get this linker error that I can't solve. I've tried to set the code
model
> to smart for the 68k processor in Code Generation but it didn't make this
> error to go away :( Is there anoyone that's having a clue how I could
solve
> this problem ???
>  \Anders R-N
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


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


Re: Link Error

2003-10-31 Thread Matthew Henry
"Harl Clifford Duffey IV" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My code compiled fine until I added a parameter to a function - now I get
> a link error:
>
> Link Error: '___Startup___' 16-bit code reference to 'PilotMain' is out of
> range
>

Have you tried moving your object files around in the first segment, moving
em to a second segment or switching to the smart memory model?

Ben would recommend otherwise,
http://www.palmoswerks.com/stories/storyReader$4, but I would suggest
switching to smart.
If you use the small model, once your app reaches a certain (large) size you
spend 20% of your coding time just trying to get your jumps to work.  Not
worth the hassle, IMO.




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


Re: Link Error : __RuntimeModule__: Near data segment is bigger than 64k.

2003-10-17 Thread Ben Combee
At 08:54 AM 10/17/2003, Vijayasaradhi D. wrote:
Dear All,

I am getting the following error. Any idea why this error would occur ?

Link Error   : __RuntimeModule__: Near data segment is bigger than 64k.

The total code size is 439K
The total Data size is 102K
I am using the Expanded Mode setting as mentioned in white paper by Ben, 
and reduced the size of the global data to some extent. My code is not 
using C++ Exception Handling too.I moved from POL to normal C++ 
application. We are using Code Warrior version 9.

The details of each segment is as shown below.

Segment#Code  Data

Segment150K   4K
Segment25K488
Segment334K   3K
Segment439K   30K
Segment559K   6K
Segment659K   31K
Segment734K   3K
Segment858K   1K
Segment953K   21K
Segment10   38K   1K
Segment11   19K   296
You're generating 30K, 31K, and 21K of data in segments 4, 6, and 9.  This 
is going to be too much data!  Look at your own source files for these 
segments and see which ones are generating so much data, then use the 
"Dissassemble" command on them to actually see where the DATA section usage 
is coming from. 

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


Re: link error CW9.2, help !

2003-10-03 Thread Ben Combee
At 04:23 AM 10/3/2003, Chris Apers wrote:
Hi,

i have ported a project from v8.3 to v9.2 and now i have link errors :

Link Error   : file.cpp: '__upper_mapC' referenced from
'File::fopenNoCase(const char*,const char*,const char*)' is undefined.
Link Error   : file.cpp: '__lower_mapC' referenced from
'File::fopenNoCase(const char*,const char*,const char*)' is undefined.
OK... this is referring to the tables used by the cctype functions to 
classify characters.  To fix this link error, you need to add the 
appropriate library to your project.  All of the MSL link libraries are in

CW for Palm OS Support\MSL\MSL_C++\MSL_Palm_OS\Lib\68K

You should pick the one that matches your int size usage (2i or 4i) and 
your expanded mode setting (A4A5 are the expanded mode libraries).

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: link error in a c++ shared library

2003-09-08 Thread Ben Combee
At 10:07 AM 9/8/2003, Eric Potter wrote:
I have some code that compiled fine in a standard c++ application, but
when I moved it to a shared library, I got a link error that says:
"Cursor.cpp: 'operator delete(void*)' reference from 'Entry::~Entry()'
is undefined."
Why is this happening?
Shared libraries link with a basic C runtime rather than a full C++ support 
package, and that basic support file doesn't include C++'s new or delete 
operators.  If you need these, you could define them using an inline 
function in a header file, or you could pull in the whole C++ support code 
from the appropriate PalmOS_Runtime file.

In general, we really don't support using C++ for shared libraries, so a 
lot of this is stuff you'll need to figure out on your own.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


RE: Link Error AppHandleEvent

2003-09-04 Thread LionScribe
Basically, From the segment tab, just choose add segment, give it any name,
and then drag some files from the first segment to the second one, so that
neither should total more than 32K. What you should know, is that any
functions that are called when the globals are not available, like alarms,
must be in the first segment.
LionScribe


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul
Groschen
Sent: Thursday, September 04, 2003 8:45 PM
To: Palm Developer Forum
Subject: Re: Link Error AppHandleEvent


I'm new to segments. Are they in 64K blocks? Do you have an example or
literature I can read. I see the segment tab in my project but I'm not sure
what to do with it

Thanks
Paul


"LionScribe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> With CW9 it's so easy to use segments, so just segment it up.
> LionScribe
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Paul
> Groschen
> Sent: Thursday, September 04, 2003 2:20 PM
> To: Palm Developer Forum
> Subject: Link Error AppHandleEvent
>
>
> I am getting the error "Link Error : Starter.c 'AppHandleEvent' 16 bit
code
> reference to 'CleaningRecordFormHandleEvent' is out of range"
>
> Can I change the order of linking to fix this? I am using Codewarrior 9
with
> constructor for Palm v1.8
>
> switch (formId)
>{
>case MainForm:
> FrmSetEventHandler(frmP, MainFormHandleEvent);
> break;
>case CleaningRecordForm:
> FrmSetEventHandler(frmP,CleaningRecordFormHandleEvent); //set event
> handler
> break;
>
> ... I have 20 forms in this case statement
>
> Thanks
> Paul
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
>



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



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


Re: Link Error AppHandleEvent

2003-09-04 Thread Paul Groschen
I'm new to segments. Are they in 64K blocks? Do you have an example or
literature I can read. I see the segment tab in my project but I'm not sure
what to do with it

Thanks
Paul


"LionScribe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> With CW9 it's so easy to use segments, so just segment it up.
> LionScribe
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Paul
> Groschen
> Sent: Thursday, September 04, 2003 2:20 PM
> To: Palm Developer Forum
> Subject: Link Error AppHandleEvent
>
>
> I am getting the error "Link Error : Starter.c 'AppHandleEvent' 16 bit
code
> reference to 'CleaningRecordFormHandleEvent' is out of range"
>
> Can I change the order of linking to fix this? I am using Codewarrior 9
with
> constructor for Palm v1.8
>
> switch (formId)
>{
>case MainForm:
> FrmSetEventHandler(frmP, MainFormHandleEvent);
> break;
>case CleaningRecordForm:
> FrmSetEventHandler(frmP,CleaningRecordFormHandleEvent); //set event
> handler
> break;
>
> ... I have 20 forms in this case statement
>
> Thanks
> Paul
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
>



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


RE: Link Error AppHandleEvent

2003-09-04 Thread LionScribe
With CW9 it's so easy to use segments, so just segment it up.
LionScribe

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul
Groschen
Sent: Thursday, September 04, 2003 2:20 PM
To: Palm Developer Forum
Subject: Link Error AppHandleEvent


I am getting the error "Link Error : Starter.c 'AppHandleEvent' 16 bit code
reference to 'CleaningRecordFormHandleEvent' is out of range"

Can I change the order of linking to fix this? I am using Codewarrior 9 with
constructor for Palm v1.8

switch (formId)
   {
   case MainForm:
FrmSetEventHandler(frmP, MainFormHandleEvent);
break;
   case CleaningRecordForm:
FrmSetEventHandler(frmP,CleaningRecordFormHandleEvent); //set event
handler
break;

... I have 20 forms in this case statement

Thanks
Paul




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



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


Re: Link Error : PalmRez Error:

2003-08-14 Thread Edward P. Ross
I usually like to provide solutions when I find the answer to a question I asked.   
Here it goes.

I turned the PC off last night and when I woke up today I turned it back on.  I 
re-compiled, and it worked.  No changes to
anything, no tweaks, no nothing.

Apparantly the computer just needed to take a break.

Thanks again -

Ed.

"Albert J. Franklin" wrote:

> Ed,
>
>Just a guess, but could the English version be interpreting the (2-byte)
> Unicode wide characters as (double the length) single byte characters?
>
> Al
> - Original Message -
> From: "Edward P. Ross" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Saturday, August 09, 2003 10:06 PM
> Subject: Link Error : PalmRez Error:
>
> > When compiling an application I am getting the following error:
> >
> > Link Error   : PalmRez Error: Menu 1000 'SÂ<«?Ý'è' item
> > 'fNf?fCfAf"fg?Efvf?ftfB?[f<' is wider than the screen.
> >
> > Link Error   : PalmRez Error: Total: 6 errors encountered. Compilation
> halted
> >
> > This is a japanese language application compiled on an English version of
> > WIndows.  I have done this so many times in teh past, most recently last
> week.
> >
> > If I open the RSRC file on a Japanese PC the resource looks fine.  Then I
> copy
> > the RSRC and .h file over to the English PC to compile and I get these
> errors.
> > The lengths of the menus aren't too long I know that for sure.
> >
> > I am wondering if there is somethign I can do to alleviate this one.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks...
> > Ed
> >
> >
> >
> >
> > --
> > Acrocat Software, L.L.C.
> > Do you workout?  Get Results.  Get PDAbs.
> > http://www.Acrocat.com/PDAbs
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
> http://www.palmos.com/dev/support/forums/

--
Acrocat Software, L.L.C.
Do you workout?  Get Results.  Get PDAbs.
http://www.Acrocat.com/PDAbs



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


Re: Link Error : PalmRez Error:

2003-08-14 Thread Edward P. Ross
Al -

That's a good point - is there a setting in CW that could have been inadvertently set? 
 I can't see anything really obvious.

Ed

"Albert J. Franklin" wrote:

> Ed,
>
>Just a guess, but could the English version be interpreting the (2-byte)
> Unicode wide characters as (double the length) single byte characters?
>
> Al
> - Original Message -
> From: "Edward P. Ross" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Saturday, August 09, 2003 10:06 PM
> Subject: Link Error : PalmRez Error:
>
> > When compiling an application I am getting the following error:
> >
> > Link Error   : PalmRez Error: Menu 1000 'SÂ<«?Ý'è' item
> > 'fNf?fCfAf"fg?Efvf?ftfB?[f<' is wider than the screen.
> >
> > Link Error   : PalmRez Error: Total: 6 errors encountered. Compilation
> halted
> >
> > This is a japanese language application compiled on an English version of
> > WIndows.  I have done this so many times in teh past, most recently last
> week.
> >
> > If I open the RSRC file on a Japanese PC the resource looks fine.  Then I
> copy
> > the RSRC and .h file over to the English PC to compile and I get these
> errors.
> > The lengths of the menus aren't too long I know that for sure.
> >
> > I am wondering if there is somethign I can do to alleviate this one.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks...
> > Ed
> >
> >
> >
> >
> > --
> > Acrocat Software, L.L.C.
> > Do you workout?  Get Results.  Get PDAbs.
> > http://www.Acrocat.com/PDAbs
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
> http://www.palmos.com/dev/support/forums/

--
Acrocat Software, L.L.C.
Do you workout?  Get Results.  Get PDAbs.
http://www.Acrocat.com/PDAbs



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


Re: Link Error : PalmRez Error:

2003-08-11 Thread Ben Combee
At 09:06 PM 8/9/2003, Edward P. Ross wrote:
When compiling an application I am getting the following error:

Link Error   : PalmRez Error: Menu 1000 'ŠÂ‹«?ݒè' item
'ƒNƒ‰ƒCƒAƒ“ƒg?Eƒvƒ?ƒtƒB?[ƒ‹' is wider than the screen.
Link Error   : PalmRez Error: Total: 6 errors encountered. Compilation halted

This is a japanese language application compiled on an English version of
WIndows.  I have done this so many times in teh past, most recently last week.
If I open the RSRC file on a Japanese PC the resource looks fine.  Then I copy
the RSRC and .h file over to the English PC to compile and I get these errors.
The lengths of the menus aren't too long I know that for sure.
I am wondering if there is somethign I can do to alleviate this one.
I don't know... make sure the PalmRez panel in your project has the 
transliteration set for Japanese, not Palm OS 3.0 or 3.1.  Also, make sure 
it's using the most up-to-date PalmRez, and in your Bin\Plugins\Support 
folder, try making a RESOURCE.FRK folder and putting a copy of PalmRez 
Japanese Support in it.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: Link Error : PalmRez Error:

2003-08-10 Thread Ken Krugler
When compiling an application I am getting the following error:

Link Error   : PalmRez Error: Menu 1000 'ä¬ã´?ðíË' item
'ÉNÉâÉCÉAÉìÉg?EÉvÉ?ÉtÉB?[Éã' is wider than the screen.
Link Error   : PalmRez Error: Total: 6 errors encountered. Compilation halted

This is a japanese language application compiled on an English version of
WIndows.  I have done this so many times in teh past, most recently last week.
If I open the RSRC file on a Japanese PC the resource looks fine.  Then I copy
the RSRC and .h file over to the English PC to compile and I get these errors.
The lengths of the menus aren't too long I know that for sure.
I am wondering if there is somethign I can do to alleviate this one.
And Albert Franklin wrote:

   Just a guess, but could the English version be interpreting the (2-byte)
Unicode wide characters as (double the length) single byte characters?
Albert was basically right. The text is in Shift-JIS (not Unicode),
where every character occupies one or two bytes in a string. For the
text above, each Katakana character is two bytes, thus when measured
as English text it appears to be wider than 160 pixels.
I don't know about Windows, but the Mac version of PalmRez has a
pop-up setting for the character encoding in CodeWarrior's PalmRez
prefs panel. You need to set this to Japanese.
--Ken
--
Ken Krugler
TransPac Software, Inc.

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


Re: Link Error : PalmRez Error:

2003-08-09 Thread Albert J. Franklin
Ed,

   Just a guess, but could the English version be interpreting the (2-byte)
Unicode wide characters as (double the length) single byte characters?

Al
- Original Message - 
From: "Edward P. Ross" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 10:06 PM
Subject: Link Error : PalmRez Error:


> When compiling an application I am getting the following error:
>
> Link Error   : PalmRez Error: Menu 1000 'SÂ<«?Ý'è' item
> 'fNf?fCfAf"fg?Efvf?ftfB?[f<' is wider than the screen.
>
> Link Error   : PalmRez Error: Total: 6 errors encountered. Compilation
halted
>
> This is a japanese language application compiled on an English version of
> WIndows.  I have done this so many times in teh past, most recently last
week.
>
> If I open the RSRC file on a Japanese PC the resource looks fine.  Then I
copy
> the RSRC and .h file over to the English PC to compile and I get these
errors.
> The lengths of the menus aren't too long I know that for sure.
>
> I am wondering if there is somethign I can do to alleviate this one.
>
> Any help would be greatly appreciated.
>
> Thanks...
> Ed
>
>
>
>
> --
> Acrocat Software, L.L.C.
> Do you workout?  Get Results.  Get PDAbs.
> http://www.Acrocat.com/PDAbs
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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


Re: Link error

2003-01-07 Thread Ben Combee
At 12:51 2003-1-7 +0100, you wrote:

Is there a way to use very large data segement ?
I really need that


No, its just not supported by Palm OS -- when Palm OS starts your program, 
it allocates a chunk of memory for your data segment, and the code in the 
OS won't allocate more than 64K for this.

If you're doing C++ development, you can try switching your application to 
expanded mode, but it may not help, depending on how you are using 
things.  See my white paper at 
http://www.metrowerks.com/pdf/Expanded_Mode.pdf for details, although it 
does need a few updates.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 


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


Re: Link error

2003-01-07 Thread Chris Apers
Is there a way to use very large data segement ?
I really need that

- Original Message -
From: "Ben Combee" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, December 24, 2002 6:29 AM
Subject: Re: Link error


> At 20:29 2002-12-23 +0100, you wrote:
> >Hi,
> >
> >First thanks to all of you who help me these past days.
> >
> >Now, I have a big problem when i try to compile a new version of my
> >program, i added some new stuff (.cpp files) and now i have these links
> >errors :
> >
> >Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
> >Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
> >Link Error   : Exception68K.cp:
> >'Ex68K_FindExceptionRecord(char*,MWExceptionInfo*)' 16-bit data reference
> >to '__segtable__' is out of range.
> >Link Error   : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data
> >reference to '__segtable__' is out of range.
> >Link Error   : MathLib.c: 'atan2(double,double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : MathLib.c: 'sin(double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : MathLib.c: 'log10(double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : MathLib.c: 'pow(double,double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : MathLib.c: 'sqrt(double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : MathLib.c: 'fabs(double)' 16-bit data reference to
> >'MathLibRef' is out of range.
> >Link Error   : imuse.cpp: 'lookup_volume(int,int)' 16-bit data reference
> >to 'lookup_table' is out of range.
> >Link Error   : imuse.cpp: 'create_lookup_table()' 16-bit data reference
to
> >'lookup_table' is out of range.
> >Link Error   : imuse.cpp: 'IMuseAdlib::random_nr(int)' 16-bit data
> >reference to 'init$2216' is out of range.
> >...
> >
> >does anyone know what i'm doing wrong ?
> >I use CW8.3, Large mode - 4bytes ints
>
> You have too much data in your application.  The data segment can be at
> most 64K, and you've exceeded this size.  This can be due to lots of
> reasons, including having large arrays defined, lots of constant data, or
> something like that.  You should first look at reducing your data usage,
> and if that impractical, check into using expanded mode to move some of
the
> data into a second data segment.
>
> See http://www.metrowerks.com/pdf/Expanded_Mode.pdf for more details on
> expanded mode.
>
> --
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>

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



Re: Link error

2002-12-23 Thread Ben Combee
At 20:29 2002-12-23 +0100, you wrote:

Hi,

First thanks to all of you who help me these past days.

Now, I have a big problem when i try to compile a new version of my 
program, i added some new stuff (.cpp files) and now i have these links 
errors :

Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
Link Error   : Exception68K.cp: 
'Ex68K_FindExceptionRecord(char*,MWExceptionInfo*)' 16-bit data reference 
to '__segtable__' is out of range.
Link Error   : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data 
reference to '__segtable__' is out of range.
Link Error   : MathLib.c: 'atan2(double,double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'sin(double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'log10(double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'pow(double,double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'sqrt(double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'fabs(double)' 16-bit data reference to 
'MathLibRef' is out of range.
Link Error   : imuse.cpp: 'lookup_volume(int,int)' 16-bit data reference 
to 'lookup_table' is out of range.
Link Error   : imuse.cpp: 'create_lookup_table()' 16-bit data reference to 
'lookup_table' is out of range.
Link Error   : imuse.cpp: 'IMuseAdlib::random_nr(int)' 16-bit data 
reference to 'init$2216' is out of range.
...

does anyone know what i'm doing wrong ?
I use CW8.3, Large mode - 4bytes ints

You have too much data in your application.  The data segment can be at 
most 64K, and you've exceeded this size.  This can be due to lots of 
reasons, including having large arrays defined, lots of constant data, or 
something like that.  You should first look at reducing your data usage, 
and if that impractical, check into using expanded mode to move some of the 
data into a second data segment.

See http://www.metrowerks.com/pdf/Expanded_Mode.pdf for more details on 
expanded mode.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 


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


Re: Link error

2002-12-23 Thread Horace Ho
See if this helps: http://oasis.palm.com/dev/kb/papers/1469.cfm

horace

"Chris APERS" <[EMAIL PROTECTED]> wrote in message
news:106302@palm-dev-forum...

Hi,

First thanks to all of you who help me these past days.

Now, I have a big problem when i try to compile a new version of my program,
i added some new stuff (.cpp files) and now i have these links errors :

Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
Link Error   : saveslot.cpp: Near data segment is bigger than 64k.
Link Error   : Exception68K.cp:
'Ex68K_FindExceptionRecord(char*,MWExceptionInfo*)' 16-bit data reference to
'__segtable__' is out of range.
Link Error   : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data reference
to '__segtable__' is out of range.
Link Error   : MathLib.c: 'atan2(double,double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'sin(double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'log10(double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'pow(double,double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'sqrt(double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : MathLib.c: 'fabs(double)' 16-bit data reference to
'MathLibRef' is out of range.
Link Error   : imuse.cpp: 'lookup_volume(int,int)' 16-bit data reference to
'lookup_table' is out of range.
Link Error   : imuse.cpp: 'create_lookup_table()' 16-bit data reference to
'lookup_table' is out of range.
Link Error   : imuse.cpp: 'IMuseAdlib::random_nr(int)' 16-bit data reference
to 'init$2216' is out of range.
...

does anyone know what i'm doing wrong ?
I use CW8.3, Large mode - 4bytes ints

thanks for your help




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



Re: Link Error: RuntimeModule Startup blah blah

2002-11-15 Thread Ben Combee


Link Error : __RuntimeModule__: '__Startup__' reference from
'__DummyStartup__' is undefined.


__Startup__ is supplied by one of the CodeWarrior runtime libraries.  You 
can either use StartupCode.lib or one of the PalmOS_Runtime library files 
that CodeWarrior installs.  The runtime library is responsible for setting 
things up in your application before your PilotMain function gets called.

The role of the libraries is described in the "Developer Notes - Palm 
Tools.txt" file in the root directory of the CodeWarrior installation, as 
well at the Targeting Palm OS manual included with the product.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


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


Re: Link Error: RuntimeModule Startup blah blah

2002-11-15 Thread Eddy
Eh? it seems to have worked!

I added (ie. dragged and dropped into the project under files)

BuildHeaders.mcp
PalmOSRuntime_2i_A5.lib

And now the make works! Great!

Now, I have to figure why the code does nothing ;)

Thanks again!

"Daniel Suleski" <[EMAIL PROTECTED]> wrote in message
news:101304@palm-dev-forum...
>
> That error message sounds awfully familiar when I was first starting up on
> CW8 last month.  Wish I remembered what the problem was; however, I can
> throw some things you may want to try out there...
>
> 1. Make certain that you are linking with the right libraries.  In my
> project, I am using "BuildHeaders.mcp", and "PalmOSRuntime_2i_A5.lib".
>
> 2. Make certain you aren't declaring globals inside of the "#pragma
> warn_a5_access on" block that should be in your main file.
>
> 3. Going back to #1...there was a project that I needed to build for a Win
> system.  I believe it was "BuildHeaders".  So take a second look at that.
>
> Sorry, that's all I can think of.
>
> Regards,
>
> Daniel Suleski :->
> TD, Mysticware Inc.
> www.mysticware.com
>
>
> - Original Message -
> From: "Eddy" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Friday, November 15, 2002 10:33 PM
> Subject: Link Error: RuntimeModule Startup blah blah
>
>
> > Hi I'm breaking out the little STdio app and I'm compiling the bugger in
> > Codewarrior 8.
> >
> > I've setup the application interface (Text and scrollbar) and I wrote
> > (copied from palm companion) the code to create the application handler.
> >
> > During my compile I'm getting a linking error which goes like this:
> >
> > Link Error : __RuntimeModule__: '__Startup__' reference from
> > '__DummyStartup__' is undefined.
> >
> > I know it's probably cause I setup the Target incorrectly, but short of
> > reading the entire manual, I'm not so sure what to do. anybody know this
> one
> > off the top of their head?
> >
> > I'm supposed to link StdIOProvider.c and StdIOPalm.c into the code, so
> I've
> > just added them to the file list in the .mcp. Is that enough?
> >
> > Thanks,
> >
> > EdO
> >
> >
> >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
> >
>
>
>
>



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



Re: Link Error: RuntimeModule Startup blah blah

2002-11-15 Thread Eddy
Daniel..thank you very much for your reply.

I am getting close to this. I can't believe how long this is taking me to
get done...rather fustrating ;)

I can see that I need to link something, but I'm not familar with the
codewarrior environment.

In the program which I have that can compile, I can see BuildHeaders.mcp
under the Targets. However in the one I have now, I do not see it, and I'm
not sure how to get it into the targets.

Sorry this is such a "fresh" question, but I'm not used to using
IDE's...this is part of the reason why ;)

Cheers,

EdO

"Daniel Suleski" <[EMAIL PROTECTED]> wrote in message
news:101304@palm-dev-forum...
>
> That error message sounds awfully familiar when I was first starting up on
> CW8 last month.  Wish I remembered what the problem was; however, I can
> throw some things you may want to try out there...
>
> 1. Make certain that you are linking with the right libraries.  In my
> project, I am using "BuildHeaders.mcp", and "PalmOSRuntime_2i_A5.lib".
>
> 2. Make certain you aren't declaring globals inside of the "#pragma
> warn_a5_access on" block that should be in your main file.
>
> 3. Going back to #1...there was a project that I needed to build for a Win
> system.  I believe it was "BuildHeaders".  So take a second look at that.
>
> Sorry, that's all I can think of.
>
> Regards,
>
> Daniel Suleski :->
> TD, Mysticware Inc.
> www.mysticware.com
>
>
> - Original Message -
> From: "Eddy" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Friday, November 15, 2002 10:33 PM
> Subject: Link Error: RuntimeModule Startup blah blah
>
>
> > Hi I'm breaking out the little STdio app and I'm compiling the bugger in
> > Codewarrior 8.
> >
> > I've setup the application interface (Text and scrollbar) and I wrote
> > (copied from palm companion) the code to create the application handler.
> >
> > During my compile I'm getting a linking error which goes like this:
> >
> > Link Error : __RuntimeModule__: '__Startup__' reference from
> > '__DummyStartup__' is undefined.
> >
> > I know it's probably cause I setup the Target incorrectly, but short of
> > reading the entire manual, I'm not so sure what to do. anybody know this
> one
> > off the top of their head?
> >
> > I'm supposed to link StdIOProvider.c and StdIOPalm.c into the code, so
> I've
> > just added them to the file list in the .mcp. Is that enough?
> >
> > Thanks,
> >
> > EdO
> >
> >
> >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
> >
>
>
>
>



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



Re: Link Error: RuntimeModule Startup blah blah

2002-11-15 Thread Daniel Suleski
That error message sounds awfully familiar when I was first starting up on
CW8 last month.  Wish I remembered what the problem was; however, I can
throw some things you may want to try out there...

1. Make certain that you are linking with the right libraries.  In my
project, I am using "BuildHeaders.mcp", and "PalmOSRuntime_2i_A5.lib".

2. Make certain you aren't declaring globals inside of the "#pragma
warn_a5_access on" block that should be in your main file.

3. Going back to #1...there was a project that I needed to build for a Win
system.  I believe it was "BuildHeaders".  So take a second look at that.

Sorry, that's all I can think of.

Regards,

Daniel Suleski :->
TD, Mysticware Inc.
www.mysticware.com


- Original Message -
From: "Eddy" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 10:33 PM
Subject: Link Error: RuntimeModule Startup blah blah


> Hi I'm breaking out the little STdio app and I'm compiling the bugger in
> Codewarrior 8.
>
> I've setup the application interface (Text and scrollbar) and I wrote
> (copied from palm companion) the code to create the application handler.
>
> During my compile I'm getting a linking error which goes like this:
>
> Link Error : __RuntimeModule__: '__Startup__' reference from
> '__DummyStartup__' is undefined.
>
> I know it's probably cause I setup the Target incorrectly, but short of
> reading the entire manual, I'm not so sure what to do. anybody know this
one
> off the top of their head?
>
> I'm supposed to link StdIOProvider.c and StdIOPalm.c into the code, so
I've
> just added them to the file list in the .mcp. Is that enough?
>
> Thanks,
>
> EdO
>
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>



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



Re: Link error for Filename.cpp : Near data segment bigger than64k

2002-11-14 Thread Jayanarayanan M N
Understood.  Thank you.

We had some big global objects. Now we made global pointers to them 
where actual objects are created on heap at the startup.
Works for now. Need to implement ideas from 
http://www.metrowerks.com/pdf/Expanded_Mode.pdf. But that can wait, 
hopefully.
-Jayan

Ben Combee wrote:

At 16:27 2002-11-14 +0530, you wrote:


Dear All,
I have rather big application.Today we added some more file to 
project. Now we get  link error.
"Near data segment bigger than 64k"
I found in code warrior help  to
"Select the Far Data and Far Strings checkboxes in the 68K Processor 
settings panel."
I am on Codewarrior 8.2 Windows 2000. These checkboxes are disabled.


"Far data" and "far strings" are settings that could be used when 
writing Mac OS applications, but aren't applicable to Palm OS app 
development because data and code segments cannot exceed 64K, while 
they could exceed that size on 68K-based Mac OS.

There have been several posts here on palm-dev lately on dealing with 
too-large data segments.  I urge you to read through them at 
http://www.escribe.com/computing/pcpqa/index.html to see what's 
already been said.



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



Re: Link error for Filename.cpp : Near data segment bigger than 64k

2002-11-14 Thread Ben Combee
At 16:27 2002-11-14 +0530, you wrote:

Dear All,
I have rather big application.Today we added some more file to project. 
Now we get  link error.
"Near data segment bigger than 64k"
I found in code warrior help  to
"Select the Far Data and Far Strings checkboxes in the 68K Processor 
settings panel."
I am on Codewarrior 8.2 Windows 2000. These checkboxes are disabled.

"Far data" and "far strings" are settings that could be used when writing 
Mac OS applications, but aren't applicable to Palm OS app development 
because data and code segments cannot exceed 64K, while they could exceed 
that size on 68K-based Mac OS.

There have been several posts here on palm-dev lately on dealing with 
too-large data segments.  I urge you to read through them at 
http://www.escribe.com/computing/pcpqa/index.html to see what's already 
been said.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


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


Re: Link Error

2002-09-13 Thread Ben Combee

At 02:19 PM 9/13/2002 +0800, you wrote:
>Hi.
>
>I'm new to CodeWarrior IDE. There are two forms (MainForm and
>SecondForm) and one header file (Starter.h). When doing the
>compilation:
>
>Link Error   : Starter.cpp: 'MainFormHandleEvent(EventType*)'
>referenced from 'AppHandleEvent(EventType*)' is undefined.
>
>Link Error   : Starter.cpp: 'SecondFormHandleEvent(EventType*)'
>referenced from 'AppHandleEvent(EventType*)' is undefined.
>
>
>In the Starter.cpp, it has been declared the particular header file,
>Starter.h.

My first guess would be that you've declared these as static.  See 
palmoswerks.com for information on static types, and their history in 
CodeWarrior (I don't have the story index right now, but its an early one).

Second guess would be that your MainForm and SecondForm source files are 
just .c files, so you're generating unmangled names in the C source, but 
trying to use them as mangled names from Starter.cpp.

-- 
Ben Combee
CodeWarrior for Palm OS Platform technical lead
[EMAIL PROTECTED]


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



Re: Link Error

2002-09-13 Thread Vikas Lakkashetti

Hi Quennie,
Check out the following
1.The MainFormHandleEvent and SecondFormHandleEvent have a prototype defined
either in the same file or in some .h file.
2.I hope the Project Access Paths are set to appropriate values.
The same can be found under Edit->Debug/Build Settings
Do lemme know aftet checking this out
.

> Hi.
>
> I'm new to CodeWarrior IDE. There are two forms (MainForm and
> SecondForm) and one header file (Starter.h). When doing the
> compilation:
>
> Link Error : Starter.cpp: 'MainFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
>
> Link Error : Starter.cpp: 'SecondFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
>
>
> In the Starter.cpp, it has been declared the particular header file,
> Starter.h.
>
> The library using: PalmOSRuntime_2i_A5.lib
>
> Pls help me.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


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



Re: Link Error

2002-09-13 Thread siewti_keng

Yes. I do have the AppHandleEvent(EventType*) function in the 
Starter.cpp(main cpp). Besides, the MainFormHandleEvent(EventType*) 
and SecondFormHandleEvent(EventType*) are in MainForm.cpp and 
SecondForm.cpp respectively (which forms do their functions at form 
level). 

I have declared the function prototypes in the Starter.h and both 
MainFrom.cpp and SecondForm.cpp have included the header file.

Pls advise.


--- In [EMAIL PROTECTED], Henk Jonas <[EMAIL PROTECTED]> wrote:
Do you have both functions MainFormHandleEvent and 
SecondFormHandleEvent? It's your task to write them.

Henk



[EMAIL PROTECTED] wrote:

> Hi.
> 
> I'm new to CodeWarrior IDE. There are two forms (MainForm and
> SecondForm) and one header file (Starter.h). When doing the
> compilation:
> 
> Link Error   : Starter.cpp: 'MainFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
> 
> Link Error   : Starter.cpp: 'SecondFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
> [...]


-- 
--
---
[EMAIL PROTECTED]   
www.metaviewsoft.de

http://www.handango.com/PlatformTopSoftware.jsp?
authorId=95946">
http://user.cs.tu-berlin.de/~jonash/werbung.jpg";>
--
---


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



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



Re: Link Error

2002-09-12 Thread Henk Jonas

Do you have both functions MainFormHandleEvent and 
SecondFormHandleEvent? It's your task to write them.

Henk



[EMAIL PROTECTED] wrote:

> Hi.
> 
> I'm new to CodeWarrior IDE. There are two forms (MainForm and
> SecondForm) and one header file (Starter.h). When doing the
> compilation:
> 
> Link Error   : Starter.cpp: 'MainFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
> 
> Link Error   : Starter.cpp: 'SecondFormHandleEvent(EventType*)'
> referenced from 'AppHandleEvent(EventType*)' is undefined.
> [...]


-- 
-
[EMAIL PROTECTED]   www.metaviewsoft.de

http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
http://user.cs.tu-berlin.de/~jonash/werbung.jpg";>
-


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



RE: Link Error

2002-09-11 Thread Vinu Raj



> -Original Message-
> From: Dilek Özgü 
> 
> 
> Hi.
> I use to print function (in Symbol SDK Support).
> 
> extern "C" {
>  #include "PtPrint.h"
> }
> 
> When my program size increased , Its give me errors
> "
> Link Error : Starter.cpp : 'PrinterOpen()' 16-bit code reference to
> 'ptOpenPrinter' is out of range"
> 
> 
> How can I do that.
> Thanks

This error is normally due to a jump instruction to an address of a function that lies 
beyond the normal address range, which is 32KB from the current location. You can 
avoid the error by adjusting the type of memory model that you are using within the 
project. There are three memory models that are supported by CodeWarrior for Palm 
version 8: small,large, and smart. 

The large memory model actually generates a series of instructions that allows you to 
make function calls beyond the 32KB range as opposed to the single jump instruction 
that is used in the small model. The smart model is a combination of the small and the 
large model in which the compiler will try to use the small model wherever it can in 
order to avoid the code bloat caused by the large model. The code model can be changed 
in the 68K Processor panel in the target settings for the project.

However, you should try to avoid using the smart or large memory models if possible 
for performance reasons and to avoid unnecessary code bloat. One way to do this would 
be to try rearranging your code in the Link Order tab of the IDE project window in 
order to reduce some of the distance between certain function calls.

Vinu  

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



Re: Link Error : [file].c: '__wswtch__' referenced from '[Form]HandleEvent' is undefined

2002-07-16 Thread Ben Combee

In article <91220@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
> I searched the archives and see lots of Link Errors - any clues on this one?
> Is there a reference somewhere where I can figure out what __wswtch__ even
> is?

It is a CodeWarrior runtime library call that's used when you have a 
complex switch statement in your C code.  It lives in the CodeWarrior 
runtime library.

> I have multiple targets in my project, and the full debug target works fine,
> so I'm sure it's just a target setting of some sort, but I've been through
> the settings a number of times and don't see anything wrong...

You need to link against the appropriate runtime library.  Do you have 
an entry in your target for PalmOS_Runtime_2i.lib (if you're using V8) 
or MSL Palm OS Runtime 2i.lib (if you're using an older version)?
-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

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



RE: LINK ERROR BEN

2002-07-03 Thread Ben Combee

In article <90239@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
> Hi everyone (BEN),
> 
> >I replied to this same question on >pilot.programmer.codewarrior -- you
> >need to change the 68K Processor setting for >Floating Point from
> >"Library" to "Palm OS".
> 
> 
> If you need to set this to "PALM OS" why does the multi segment stationary
> set it to Library?  Is there a reason or is it just an oversight?

Because PalmSource made that stationery, not Metrowerks.  It is a 
mistake.  With CW for Palm OS V8, we altered the pref panel so you can't 
set this incorrectly -- it is always on "Palm OS" when you're building a 
Palm OS project.
-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

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



RE: LINK ERROR BEN

2002-07-02 Thread George Bassili

Hi everyone (BEN),

>I replied to this same question on >pilot.programmer.codewarrior -- you
>need to change the 68K Processor setting for >Floating Point from
>"Library" to "Palm OS".


If you need to set this to "PALM OS" why does the multi segment stationary
set it to Library?  Is there a reason or is it just an oversight?

Rgds,
George B


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



Re: LINK ERROR HELP

2002-07-02 Thread Ben Combee

In article <90156@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
> Hi everyone,
> i just changed my app to a multi-segment app and i am getting a string of
> link errors that appear to indicate the floating point stuff is not being
> included.
> But i have included MSL Runtime Palm OS (2i).Lib.
> 
> the errors are as below.  HELP
> I am using CW6 on win xp.
> 
> Thanks.
> George B
> 
> Link Error   : Mmpro.c: '_f_itof' referenced from 'GadgetTableDraw' is
> undefined.

I replied to this same question on pilot.programmer.codewarrior -- you 
need to change the 68K Processor setting for Floating Point from 
"Library" to "Palm OS".

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

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



Re: LINK ERROR HELP

2002-07-02 Thread abhandari

George,
In CodeWarrior, go to Edit/Preferences/Debugger/Global Settings and
check the 'Auto Target Libraries' checkbox. It should fix the problem.

Anupam
- Original Message -
From: "George Bassili" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 8:26 AM
Subject: LINK ERROR HELP


> Hi everyone,
> i just changed my app to a multi-segment app and i am getting a string of
> link errors that appear to indicate the floating point stuff is not being
> included.
> But i have included MSL Runtime Palm OS (2i).Lib.
>
> the errors are as below.  HELP
> I am using CW6 on win xp.
>
> Thanks.
> George B
>
> Link Error   : Mmpro.c: '_f_itof' referenced from 'GadgetTableDraw' is
> undefined.
>
> Link Error   : Mmpro.c: '_f_flt' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_div' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_add' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_ftod' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_d_div' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_d_dtof' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_mul' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_sub' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_ftod' referenced from 'abs' is undefined.
>
> Link Error   : Mmpro.c: '_d_flt' referenced from 'abs' is undefined.
>
> Link Error   : Mmpro.c: '_f_neg' referenced from 'abs' is undefined.
>
> Link Error   : Mmpro.c: '_f_fge' referenced from 'sqrt' is undefined.
>
> Link Error   : Mmpro.c: '_f_ftou' referenced from 'GadgetTableDraw' is
> undefined.
>
> Link Error   : Mmpro.c: '_d_itod' referenced from 'GadgetTableDraw' is
> undefined.
>
> Link Error   : Mmpro.c: '_d_mul' referenced from 'GadgetTableDraw' is
> undefined.
>
> Link Error   : Mmpro.c: '_d_dtou' referenced from 'GadgetTableDraw' is
> undefined.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>




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



Re: Link Error

2002-05-13 Thread Ben Combee

In article <86146@palm-dev-forum>, [EMAIL PROTECTED] 
says...
> 
> I'm having trouble getting my application to link.  I get the errors
> "Link Error   : __RuntimeModule__: Near data segment is bigger than 64k."
> and
> "Link Error   : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data
> reference to '__segtable__' is out of range."
> I'm using Code Warrior 8.0, and I've tried it with both single segment and
> multiple segments.

These aren't code problems, but data problems.  Your data size has 
gotten too large for the single 64K data segment.

Look and see if you can change some large global variables to pointers 
to variables allocated at run time.  If you're using lots of C++ 
features like virtual functions and exceptions look into using expanded 
mode to allocate a second data section for those compiler-generated 
structures.  See the articles at www.palmoswerks.com for ideas on moving 
data around and restructuring your code to make things fit better.


-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

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



Re: Link Error

2002-05-13 Thread Dave Lippincott

http://oasis.palm.com/dev/kb/faq/1418.cfm
Most answers are already in the Knowledge Base.

- Original Message -
From: "Don Sherwood" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, May 13, 2002 10:47 AM
Subject: Link Error


> I'm having trouble getting my application to link.  I get the errors
> "Link Error   : __RuntimeModule__: Near data segment is bigger than 64k."
> and
> "Link Error   : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data
> reference to '__segtable__' is out of range."
> I'm using Code Warrior 8.0, and I've tried it with both single segment and
> multiple segments.
>
> Any hints?
>
> Thanks
> Don
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


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



Re: Link error in Codewarrior 7.0

2002-03-14 Thread Jason Freund


Thanks! That worked.  In my Files tab of the project window, both the Debug
and Release targets list exactly the same set of files.  StartupCode.lib was
listed in a "Palm OS Device" folder in the project window for both Debug and
Release.

But when I switched to the Segments tab, there was a folder called
"StartupCode MUST be first!".  The Debug target had it, but the Release did
not.  I was able to simply add files to project to add the lib to just the
Release version, and then it would build

-Jason

> From: Ben Combee (view other messages by this author)
> Date: Wed, 13 Mar 2002 20:09:15
> Make sure that the StartupCode.lib or MSL Runtime (whatever).lib file is
> in both your release and debug targets.  To do this, click on the
> library in the project, then go to the project inspector (it is one of
> the buttons at the top of the project window).  In this dialog, you can
> see what targets the file is associated with.
>
> __Startup__ is defined by the runtime library, and it ends up calling
> you PilotMain.


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



Re: Link error in Codewarrior 7.0

2002-03-14 Thread Jatin Sethi

Hi Ben:
Actually since my last post I never got this to work. I will try your new
suggestion. It makes a lot of sense since I do not remember including the
StartupCode.lib in any of the targets.
Thanks,
Jatin Sethi (jay).

"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:79816@palm-dev-forum...
>
>
> "Jason Freund" <[EMAIL PROTECTED]> wrote in message
> news:79770@palm-dev-forum...
> >
> > I'm having a similar problem -- and I still can't get it resolved...
> >
> > CW 7.0 compiles my app perfectly for the Debug version, but when I try
> to
> > build the Release target, the linker gives:
> >
> > Link Error   : __RuntimeModule__: '__Startup__' referenced from
> > '__DummyStartup__' is undefined.
> >
> > I don't know where Startup or DummyStartup would be defined (they're
> not
> > part of my app).  I created my app project using the New project
> wizard (I
> > think I selected New Palm OS 3.5 Stationary Project, but maybe it was
> New
> > Palm OS Application).  In any case, the project started out as a clone
> of
> > the "Starter" application with both the Debug and Release targets
> already
> > setup.  I just started changing the "Starter" name to "MyProject" name
> > everywhere.  That seems to have worked -- there is no trace of any of
> the
> > original Starter files or names in my project, but I still have this
> link
> > problem for the release build.
> >
> > I looked under my app's release settings under the 68k target tab.  My
> > project type is "Palm OS Application" and the only option there is
> "File
> > Name" (which is set to myproject.tmp).  There is no option for a code
> entry
> > point.
>
> Make sure that the StartupCode.lib or MSL Runtime (whatever).lib file is
> in both your release and debug targets.  To do this, click on the
> library in the project, then go to the project inspector (it is one of
> the buttons at the top of the project window).  In this dialog, you can
> see what targets the file is associated with.
>
> __Startup__ is defined by the runtime library, and it ends up calling
> you PilotMain.
>
>
>
>



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



Re: Link error in Codewarrior 7.0

2002-03-13 Thread Ben Combee


"Jason Freund" <[EMAIL PROTECTED]> wrote in message
news:79770@palm-dev-forum...
>
> I'm having a similar problem -- and I still can't get it resolved...
>
> CW 7.0 compiles my app perfectly for the Debug version, but when I try
to
> build the Release target, the linker gives:
>
> Link Error   : __RuntimeModule__: '__Startup__' referenced from
> '__DummyStartup__' is undefined.
>
> I don't know where Startup or DummyStartup would be defined (they're
not
> part of my app).  I created my app project using the New project
wizard (I
> think I selected New Palm OS 3.5 Stationary Project, but maybe it was
New
> Palm OS Application).  In any case, the project started out as a clone
of
> the "Starter" application with both the Debug and Release targets
already
> setup.  I just started changing the "Starter" name to "MyProject" name
> everywhere.  That seems to have worked -- there is no trace of any of
the
> original Starter files or names in my project, but I still have this
link
> problem for the release build.
>
> I looked under my app's release settings under the 68k target tab.  My
> project type is "Palm OS Application" and the only option there is
"File
> Name" (which is set to myproject.tmp).  There is no option for a code
entry
> point.

Make sure that the StartupCode.lib or MSL Runtime (whatever).lib file is
in both your release and debug targets.  To do this, click on the
library in the project, then go to the project inspector (it is one of
the buttons at the top of the project window).  In this dialog, you can
see what targets the file is associated with.

__Startup__ is defined by the runtime library, and it ends up calling
you PilotMain.



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



Re: Link error in Codewarrior 7.0

2002-03-13 Thread Jason Freund

I'm having a similar problem -- and I still can't get it resolved...

CW 7.0 compiles my app perfectly for the Debug version, but when I try to
build the Release target, the linker gives:

Link Error   : __RuntimeModule__: '__Startup__' referenced from
'__DummyStartup__' is undefined.

I don't know where Startup or DummyStartup would be defined (they're not
part of my app).  I created my app project using the New project wizard (I
think I selected New Palm OS 3.5 Stationary Project, but maybe it was New
Palm OS Application).  In any case, the project started out as a clone of
the "Starter" application with both the Debug and Release targets already
setup.  I just started changing the "Starter" name to "MyProject" name
everywhere.  That seems to have worked -- there is no trace of any of the
original Starter files or names in my project, but I still have this link
problem for the release build.

I looked under my app's release settings under the 68k target tab.  My
project type is "Palm OS Application" and the only option there is "File
Name" (which is set to myproject.tmp).  There is no option for a code entry
point.

Thanks,
-Jason


> From: Ben Combee (view other messages by this author)
> Date: Wed, 13 Feb 2002 23:56:29
>
> > "jay" <[EMAIL PROTECTED]> wrote in message
news:76583@palm-dev-forum...
> >
> Dear Friends:
> > In my effort to understand what goes in behind linking a hack I am
trying to
> > rebuild the DemoHack (by Matthew Moss) from scratch in Codewarrior
7.0. I
> > get the following error:
> >
> > Link Error   : __RuntimeModule__: 'myFrmDrawForm' referenced from
> > '__DummyStartup__' is undefined.
> >
> > myFrmDrawForm is the name of the target and DummyStartup is nothing
but what
> > the name indicates. The DummyStartup file looks like:
> >
> > #define dummyStartup __Startup__
> > void dummyStartup (void);
> > void dummyStartup (void)
> > {
> > }
>
> If you look in the 68K Target panel, there is a choice for the entry
> point for your code resource.  I would guess that its set to
> "__RuntimeModule__" instead of "__Startup__".


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



Re: Link error in Codewarrior 7.0

2002-02-13 Thread Ben Combee


"jay" <[EMAIL PROTECTED]> wrote in message
news:76583@palm-dev-forum...
>
> Dear Friends:
> In my effort to understand what goes in behind linking a hack I am
trying to
> rebuild the DemoHack (by Matthew Moss) from scratch in Codewarrior
7.0. I
> get the following error:
>
> Link Error   : __RuntimeModule__: 'myFrmDrawForm' referenced from
> '__DummyStartup__' is undefined.
>
> myFrmDrawForm is the name of the target and DummyStartup is nothing
but what
> the name indicates. The DummyStartup file looks like:
>
> #define dummyStartup __Startup__
> void dummyStartup (void);
> void dummyStartup (void)
> {
> }

If you look in the 68K Target panel, there is a choice for the entry
point for your code resource.  I would guess that its set to
"__RuntimeModule__" instead of "__Startup__".



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



  1   2   >