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.
解決済! 解決策の投稿を見る。
Hi Henry,
Thanks for your response.
Your change from Ansib.lib to Ansibf.lib is correct, you need to use ansibf.lib rather than ansib.lib to enable floating point support.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
Hi Henry,
Could you tell us which MCU are you using?
Best Regards,
Carlos Mendoza
Technical Support Engineer
Dear Carlos,
I am using S12DP512 now. I just change the library from Ansib.lib to
Ansibf.lib. It seems can work. Is this method correct?
Best regards,
Henry
Hi Henry,
Thanks for your response.
Your change from Ansib.lib to Ansibf.lib is correct, you need to use ansibf.lib rather than ansib.lib to enable floating point support.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer