rzel / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

mbed online compiler fails on snprintf #222

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Build mbed platform using the mbed.org online compiler (no debug options)

What is the expected output? What do you see instead?
int.c obj.c strobj.c get "identifier "snprintf" is undefined" errors.

What version of the product are you using? On what operating system?
latest update of main branch

Please provide any additional information below.
I had to add #include <stdio.h> for these three files to avoid a compilation 
error.  It looks like this related to Issue 215 modifications and these three 
files need the same fix you used for float.c.

Original issue reported on code.google.com by j...@missioncognition.net on 8 Feb 2012 at 11:56

GoogleCodeExporter commented 9 years ago
I was initially confused why my offline compile builds using code sourcery gcc 
were working but the online mbed.org compiler was not.  It turns out gcc was 
generating a warning and using an implicit declaration (which is not a good 
idea) so it looks like this should affect all platforms when doing a non-debug 
build.  I added -Werror-implicit-function-declaration to my gcc options to 
force an error if this happens again.

Original comment by j...@missioncognition.net on 9 Feb 2012 at 12:11

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 5e690a1264c2.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 6:36

GoogleCodeExporter commented 9 years ago
Added #include <stdio.h> to three files so mbed cloud compiler works.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 6:37