I'm trying to use sprintf function to convert a float value to a string, but it doesn't work, this function with integer values works fine.
an example of use is this:
valueInteger = 420;
valueFloat = 4.20;
sprintf(str,"%d",valueInteger); //works fine
sprintf(str,"%f",valueFloat); //Doesn't work
I read help of CodeWarrior about sprintf function and this note at the end of page could be the way to fix my problem
Floating point support increases the sprintf size considerably, and therefore the define LIBDEF_PRINTF_FLOATING exists. Set LIBDEF_PRINTF_FLOATING if no floating point support is used. Some targets contain special libraries without floating point support.
The IEEE64 floating point implementation only supports printing numbers with up to nine decimal digits. This limitation occurs because the implementation is using unsigned long internally, which cannot hold more digits. Supporting more digits increases the printf size still more and also causes the application to run considerably slower.
How I set LIBDEF_PRINTF_FLOATING in order to sprintf works?