I am currently developping an application on MPC5748G, using S32 Design Studio for Power Architecture, Version 1.0 build 151127. The project is compiled with GCC, using a make file.
My application uses the function "atof" from the EWL_C library. But unfortunatly, I get an error during the link:
undefined reference to `atof'
What needs to be done to make sure this function is linked correctly?
The EWL_C library source code contains the function but is it really compiled?
Thank you for your help.
Hi,
try the following:
add file __strtold.c to your project (src folder). This file is placed in S32DS installation folder at path S32DS/e200_ewl2/EWL_C/src/stdio. Clean project and recompile.
I tested it with the following code and it seems that it returns correct result.
float val1;
char str1[20];
strcpy(str1, "98993489");
val1 = atof(str1);
Regards,
Martin
Thank you for your help.
We finally solved the problem by updating S32 Design Studio to latest version V1.1 (build id: 160608)
Surely this version has an updated EWL_C library with the Atof function, because we don't have any link error anymore.
Thanks.
Hi,
I had consulted this topic few minutes ago with one of our experts, and he confirmed me that S32DS v 1.1 is EWL_C library fixed and you are able to use atof function without any workarounds.
Regards,
Martin