I gave that a try but it didn't work. The linker complained about not being able to 
resolve the reference to the function from the jump table. I tried "static" on both 
the declaration and definition, and then on each separately, with the same result each 
time.

I went back to the original GaussLib example (which I was able to build successfully) 
and added the following three lines of code to the GaussLibCreate function:

        float a,b;
        a=2.0;
        b=3.0*a;

This was enough to generate the "global data ignored" message from build-prc. If I 
comment out the third line, the message goes away. Why would this line cause global 
data to be created? Arghhhh. Is it a compiler or linker switch set wrong?

Dave
-------Original Message-------
From: Dave Lippincott <[EMAIL PROTECTED]>
Sent: 03/10/03 12:24 PM
To: Palm Developer Forum <[EMAIL PROTECTED]>
Subject: Re: floats in syslib shared library under prc-tools 2.2?

> 
> try declaring your routine as a static function.
static void HelloLibSquare...
There is nothing wrong with using floats or doubles in libraries..

----- Original Message -----
From: "David Ek" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 12:10 PM
Subject: floats in syslib shared library under prc-tools 2.2?


> I'm trying to build a simple "Hello Lib" example syslib library using
prc-tools 2.2. Other than the open, close, sleep, and wake functions, the
only function in the library looks like this:
>
> void HelloLibSquare( UInt16 refnum, float in, float* out ) {
>    *out = in * in;
>    return;
> }
>
> When I build this library, the build-prc step gives me a warning:
> "global data ignored". I used m68k-palmos-objdump --section-headers to
view the hellolib file and it shows nonzero-sized .data and .bss segments.
Curiously, if I comment out the first line of the body of HelloLibSquare,
the warning goes away and the .data and .bss segment sizes are zero. The
same is true if I make my arguments ints instead of floats.
>
> I'm using the GaussLib example from prc-tools-samples as the basis for
this, and that example builds and runs fine. Any idea why I can't use
float
(or double--that bombs, too) for my arguments?
>
> thanks -
>
> Dave
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see <a target=_blank
href="http://www.palmos.com/dev/support/forums/";>http://www.palmos.com/dev/support/forums/</a>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see <a target=_blank
href="http://www.palmos.com/dev/support/forums/";>http://www.palmos.com/dev/support/forums/</a>
> 

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

Reply via email to