Greetings...
Sorry if this is off topic.
I would like to use some simple trig functions in one of my Palm OS
applications. I tried to use some simple math functions in CW, but I
got stuck. Can some help me out? In case it matters, I am using
Windows 98 SE on a Pentium 550, with 256 MB of RAM.
I started very slow by adding
#include "math.h"
double z, x = 0;
z = sin(x);
But the compiler couldn't find the header file on it its own. That
seems really strange to me. Why should a compiler not know where it's
own includes are??? It makes me think I /must/ be missing something.
But what? Maybe I messed up something on the install procedure?
Anyway I went to the project settings and set up an access path in the
compiler. Now math functions show up in blue as soon as type them.
Nice. But they still don't link.
I get an error saying
Link Error: Starter.c "sind" referenced from PilotMain is not defined.
Presumably "sind" is the internal function for "Sine" double precision.
But I have no idea what else to include. I have read the help file and
it doesn't say I need to include other files besides math.h. OTOH if
the compiler can't find it's own includes, maybe the linker can't find
the libraries. Where are those? And how do I include them?
On the same thread, do I have to include the entire math library? or
will the compiler/linker only include those functions that I actually
use? Can I get some measure of how much overhead these functions calls
are putting in my program?
Sorry if this is too basic for this forum. I am kind of new to this
compiler business. For 20 years I managed to get by with interpreted
languages but now I am way behind on "compiler/linker" basics. As a
former physicist I could write a trig library (and test it) in about 2
hours, but I am sure it would not have the speed/accuracy of a
professional package like Metrowerks. That I why I am trying so hard to
figure this out.
Thank in advance for your assistance,
derik
P.S. if the math functions show up in blue as I type then in the
editor, how can I make my own function calls, and the PalmOS API calls
show up in blue also. It would save some trouble in compile time errors
if I got function calls turn blue as soon as I typed it and I _knew_
therefor that they were typed correctly.
derik
email: [EMAIL PROTECTED]
WWW: http://www.pobox.com/~derik
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html