AnsweredAssumed Answered

Type changing problem (Float to Int)

Question asked by Henry Wu on Jul 15, 2015
Latest reply on Jul 20, 2015 by Carlos_Mendoza

When I change a Floating point number to unsigned integer and compile the source code, the compiler would tell me some error as below

 

Link Error : L1822 : Symbol _FUFLOAT in file C:\...........................\......c.o is undefined.

Link Error : L1822 : Symbol _FMUL in file C:\.........................................c.o is undefined.

Link Error : L1822 : Symbol _FADD in file C:\.........................................c.o is undefined.

Link Error : L1822 : Symbol _FDIV in file C:\.........................................c.o is undefined.

Link Error : L1822 : Symbol _FUTRUNC in file C:\.........................................c.o is undefined.

 

Below is my source code.

#include <stdlib.h>

#include <stdio.h>

#include <float.h>

#include <hidef.h>

 

uint16_t   TempBuffer;

float           TempBufferF;

 

int main() {

 

     TempBuffer = (uint16_t) TempBufferF;

 

      return 0;

}

 

I already put the header file "hidef.h". It seems cannot help.

 

Please help.

Outcomes