hi I am problems with the sin function I include math.h but I get a linker error : Link Error : Symbol not found: Fsin referenced from main.c Link Error : undefined: 'Fsin' Referenced from 'Fmain' in main.c Link failed. the coding is as follows: #include "port.h" #include "math.h" void main (void) { double x=3; sin(x); while(1){ } return; } Please help. Regards Frikkie. |
|
sin function
Started by ●January 29, 2003
Reply by ●January 29, 20032003-01-29
Frikkie, The MSL libraries we include within CodeWarrior do not include support for higher level floating point math functions (sin being one of them) but only simple runtime floating point functions such as +, - , *, etc. This is mentioned in the Targeting_DSP56800 on page DSP- 129. You are doing everything correctly in your code, but the linker is giving you the error because there is no supporting code within the library to support the function. The Embedded SDK does include several fixed point implementations for higher level math functions that you can use (including sin, cos, etc.). You can read about them in the DSP Function Library document that comes within the Embedded SDK "Help and Documentation"...simply look at Chapter 7 which discusses the Trigonometric Math Library support. Regards, John --- In , "grdeathsa <fnmarais@n...>" <fnmarais@n...> wrote: > hi > > I am problems with the sin function I include math.h but I get a > linker error : > > Link Error : Symbol not found: Fsin referenced from main.c > Link Error : undefined: 'Fsin' > Referenced from 'Fmain' in main.c > Link failed. > > the coding is as follows: > > #include "port.h" > #include "math.h" > > void main (void) > { double x=3; > > sin(x); > > while(1){ > } > return; > } > > Please help. > > Regards > Frikkie. |