Joao V Rissi

HC12: Codewarrior do not execute the Function

Discussion created by Joao V Rissi on Aug 27, 2006
Latest reply on Jun 8, 2012 by Pascal Burel
Hi friends !
 
I am trying to make the function below. It is not functioning. The compiler Codewarrior 3,1 accuses error and appears the following message :
Link error ; L1822:smileyfrustrated:ymbol _FUFLOAT in file c:\....main.c.o is undefined.
Link error ; L1822:smileyfrustrated:ymbol _FDIV_RC in file c:\....main.c.o is undefined.
Link error ; L1822:smileyfrustrated:ymbol _MUL in file c:\....main.c.o is undefined.
Link error ; L1822:smileyfrustrated:ymbol _FSTRUNC in file c:\....main.c.o is undefined.
 
This are the codes:
 
  while (1)  // always
 {
 unsigned int res1,res2,res3;
  res1=10;
  res2=100;
  res3=prod(&res1,&res2);// Here i call the function
}
 
 
unsigned int prod (unsigned int *a,unsigned int *b) // This is the Function
{
unsigned int tempa;
unsigned int tempb;
unsigned int tempc;
signed int t;
float x;
tempa=*a; //tempa is a number between 1 to 100
tempb=*b; //tempb is a number between 1 to 100
x=(tempa/100.0)*tempb;
t=(signed int)x;
tempc=(unsigned int)t;
return(tempc);
}
 
what's wrong? Already it makes many days that I am trying and i don't know what to do to function.  Please,  help me! Thanks , JR

Message Edited by CrasyCat on 2007-04-13 02:30 PM

Outcomes