RETRO: EmBlocks compiler error: undefined reference to `floor'

Hey trying to use the EmBlocks compiler as compiling apps on a WebSite doesn’t make any sense…

I’m compiling the main firmware from: RETRO_Game_Console - | Mbed

I export it to EmBlocks, open in the app but when I compile I get this error:
“spi_api.c:(.text.spi_frequency+0x46): undefined reference to `floor’”

Any ideas?

Man I had to wait 7 hours before I could post back.
After setting “-lm” in build settings / linker settings that error goes away but then I get another:

What odd is it doesn’t give much info about the “syntax error”:

[quote]-------------- Clean: Official_RETRO in Official_RETRO ---------------

Cleaned “Official_RETRO - Official_RETRO”

-------------- Build: Official_RETRO in Official_RETRO ---------------

Compiling: Game.cpp
Compiling: Main.cpp
Compiling: DisplayN18.cpp
Linking executable: .\build\Official_RETRO.elf
Game.cpp: In member function ‘void Game::printDouble(double, int, int)’:
Game.cpp:57:9: warning: unused variable ‘len’ [-Wunused-variable]
Game.cpp: In member function ‘void Game::checkGraphReset()’:
Game.cpp:85:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Game.cpp: In member function ‘void Game::checkCollision()’:
Game.cpp:240:58: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Game.cpp:243:122: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Game.cpp:249:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Game.cpp:250:60: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
DisplayN18.cpp: In member function ‘void DisplayN18::fillRect(int, int, int, int, short unsigned int)’:
DisplayN18.cpp:177:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
c:/program files (x86)/emblocks/2.30/share/em_armgcc/bin/…/lib/gcc/arm-none-eabi/4.7.3/…/…/…/…/arm-none-eabi/bin/ld.exe:–defsym:1: syntax error
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 7 warnings (0 minutes, 1 seconds)
[/quote]

NOTE: My reason for doing this is because I don’t like the fact I can’t modify the driver code in the WebEditor. So if that API changes it could break my app just as it seems to have done with someone elses code I imported in there. The other issue is if that site removes support for your products I will no longer to able to build to my legacy devices. I have never seen anything like this with any other device.

Just a thought here… not trying to derail your posts here or anything either, we’re happy to have all comers to our party.

Might you be better off looking for an Em Blocks support forum to iron out these issues ? There have only been a few other posts that I can recall that talked about Em Blocks at all so your target audience for assistance is unlikely to be very large here…

@ Brett - Thats a good idea.

I don’t want to derail the thread either… but I remember the party after my first final in college. I was 17, and had never had alcohol… and they introduced me to beer… and after a few hours that night, I could not find the floor either !
(although apparently lots of the pizza I ate earlier in the evening, did)

(stopped drinking at 22)
(just fyi)

@ mtylerjr - " I picked a bad day to stop snorting coke"