Hi,
I'm writing a plugin (Cocoa bundle) for a Cocoa application in Xcode.
The plugin is given two arrays of doubles, and computes out[i]=sin(in[i]);
I graph this data in the main application, and verify that the actual
data handoff works just fine. For example, if I code "out[i]=in[i]"
the that gets transferred after the plugin is invoked.
Here's the goofy part: when I put the sin() in there, out[i] is 0.0.
The function is just returning 0s. Ditto for other math functions like
cos(), exp(), etc.
Now, I include math.h, and I added -lm to the linker, and I
explicitly declare "double sin(double x);" in my plugin code. I
don't get any linker errors or warnings---everything compiles and links
fine. But the sin() function just returns 0.0.
I'm really pulling my hair out over this. Anyone have any idea what I
should try? Again, this is not a Cocoa application, but a cocoa bundle.
Could that have something to do with it?
Thanks,
Xcott

Signature
"Old country music stars don't die -- they just get put in a coffin and buried
in the ground and then no one sees them ever again."
--Cat and Girl
Xcott Craver - 14 Jan 2006 03:50 GMT
>Hi,
>
>I'm writing a plugin (Cocoa bundle) for a Cocoa application in Xcode.
>The plugin is given two arrays of doubles, and computes out[i]=sin(in[i]);
Um, nevermind, I figured it out.
In case you're wondering, it was a really, really stupid mistake.
I forgot that the scale on the graph was in the tens of thousands,
and of course sin(anything) is between -1 and 1. So it just looked
like no data was coming out.
YEESH.

Signature
"Old country music stars don't die -- they just get put in a coffin and buried
in the ground and then no one sees them ever again."
--Cat and Girl
Simon Slavin - 16 Jan 2006 22:15 GMT
On 14/01/2006, Xcott Craver wrote in message
<2y_xf.99573$ME5.7430@twister.nyroc.rr.com>:
> Um, nevermind, I figured it out.
>
[quoted text clipped - 4 lines]
>
> YEESH.
Thanks for that entertainment. I've done just a silly things myself, and
am reassured to know that others are doing that too.
Simon.

Signature
http://www.hearsay.demon.co.uk