Klemen Dovrtel wrote:
> I would like to use MathLib, but every time i try to calculate something,
> i get this error: Link Error : Starter.c: 'sin' referenced from
> 'MainFormHandleEvent' is undefined. I included MathLib.h in the proyect.
> Where should i put all other (e_acos.c, e_acosh.c, etc.)? I created a
> C applicatin (a saw on this forum that the library doesn't work with
> C++ application). What could be wrong? (I am using codewarrior)
>
> code:
> #include "MathLib.h"
> SysLibFind(MathLibName, &MathLibRef);
> SysLibLoad(LibType, MathLibCreator, &MathLibRef);
> MathLibOpen(MathLibRef, MathLibVersion);
> a=sin(33);
> MathLibClose(MathLibRef, &usecount);
Sorry, my memory of MathLib is a little foggy, but aren't you supposed
to compile with a MathLib.c source file, to set up the library calls?
If you neglected that, it would explain your problem.
Are you using CodeWarrior or PODS? If PODS, you need to add the .c
file to your source code directory, then do a Refresh from the
right-click popup menu in the Navigator window on the left side of
the IDE window. (Right-click on your project's name, select Refresh,
then Project->Clean...)
Oh, and check the return values of your system calls, too. ;-)
Jay Ts
--
The foundation of all mental illness is
the avoidance of legitimate suffering.
- Carl Jung
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/