BTW, if you are interested in how a shared library is set up with
StartupCode.lib, you might want to check out the Mathlib which is included
in the Release 6 installation in the Palm OS Extras/Unsupported folder.

Rgds,
Jun-Kiat Lam
Metrowerks Technical Support

----- Original Message -----
From: "Ariel Barreiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 29, 1999 12:42 PM
Subject: RE: Desesperately need help. Shared library weird error


> Thanks a lot everybody for help me. I do solve my problem.
>
> I first tried to link the startupcode.lib but I got a linker warning due
to
> the __Startup__ of my library that overact over the __Startup__ of t he
> startupcode.lib.
>
> What I actually did is link the startup source code CWRuntime.c as you
told
> me, there are the __divu__ and __lmul__ funcitons.
>
> Thanks again.
>
> Ariel
> ----- Original Message -----
> From: William F. Weiher III <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 29, 1999 12:50 PM
> Subject: RE: Desesperately need help. Shared library weird error
>
>
> > Long divides, shifts, etc. need code from the startup library. I usually
> > just copy this code from the startup library sources into my project
> (since
> > long ago I had some problem lining the startup library to a shared
library
> > project. Sorry I have forgotten the exact problem, I just do it that way
> > from the start now)
> >
> >  -----Original Message-----
> > From: Ariel Barreiro [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 28, 1999 17:25
> > To: Palm Forum List
> > Subject: Desesperately need help. Shared library weird error
> >
> > Hello everybody,
> >
> > I have been trying to learn the basis of shared libraris and when I
almost
> > beleived that I have made it I found a heck of a mistake.
> >
> > Lets take my problem to the sample lib project from 3com or even to the
> > sample lib project from Jeff Ishaq, the fellow who wrote a great article
> > about shared libraries. Both projects compiled good. Without any error.
> Even
> > they work fine.
> >
> > Now I add a two sipmle lines to any function in my shared library (I did
> > this for testing, couse it was hard to find the exact reason of my
> problem)
> >
> > For example, I will use the sample lib project code:
> >
> > Err SampleLibDrawRectangle(UInt refNum, DWord clientContext, Int x, Int
y,
> > Int width, Int height) {
> >  Err      err = 0;
> >  Int      cornerDiam;   // corner diameter
> >  RectangleType   r;      // rectangle
> >
> > ==>     unsigned long   a,b,c;            // Added by me
> >
> > ==>      a = b / c;                            /// Added by me
> > ( ...........)
> > Here goes the rest of the code, but thats not important.
> > ( ...........)
> >  return( 0 );
> > }
> >
> > Those (the unsigned long declaration and the division) was the only
lines
> I
> > added to a project that compiled quite fine. When I recompiled it i get
> the
> > followin error
> >
> > Link Error   : SampleLib.c: '__ldivu__' referenced from
> > 'SampleLibDrawRectangle' is undefined.
> >
> > Please, if anybody has any idea of this I would apreciate it a lot.
> >
> > What I realized or guess is that the compiler is calling a dividing
> function
> > due to the / opperand and some how, who knows why, the compiler coudn't
> > found the fucntion. I went around with some linker options but without
any
> > success.
> >
> > NOTE: It is also not working with * (multiplication)
> >
> > Ariel
> > Buenos Aires, Argentina, SouthAmerica.
> >
> >
> >
> >
> >
>
>

Reply via email to