[Buildroot] C double type problem - at91sam9263

Ulf Samuelsson ulf.samuelsson at atmel.com
Tue Aug 5 10:20:34 UTC 2008

----- Original Message ----- 
  From: Richard Hardy 
  To: buildroot at uclibc.org 
  Sent: Monday, August 04, 2008 12:29 PM
  Subject: [Buildroot] C double type problem - at91sam9263

  Hi Everyone,

  I am quite new to using buildroot and embedded linux systems in general. However, I have managed to use buildroot to get a (nearly) working system up and running for an at91sam9263 board. (kernel v 2.6.22, uClibc v 0.9.29)


  I have one annoying problem though. One of the packages I am compiling from source uses C's "double" type, and this does not seem to be behaving as I need it to.


  I have created a simple example program:



  int main (int argc, char *argv[])


  double test;

  test = 1;

  fprintf(stderr, "Test double = %f.\n", test);



Should you not be using "%lf" instead of "%f" ?

   fprintf(stderr, "Test double = %lf.\n", test);

   fprintf(stderr, "Test double = %f.\n", test);

Best Regards
Ulf Samuelsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20080805/858a43c6/attachment.html>

More information about the buildroot mailing list