ErikZalm/Marlin — Issue #28: compile error on gen6 electronics
Author: sashimanu-san
Created: 2011-12-07 09:34:02+00:00
State: open

Given
`#define MOTHERBOARD 5` (as per comments)
and
*Board -> Sanguino* selected in Arduino software Tools menu
build generates an error:

```Marlin.cpp: In function 'void process_commands()':
Marlin:642: error: 'sprintf' was not declared in this scope```

Code piece in question
```c
case 30: //M30 take time since the start of the SD print or an M109 command
{
stoptime=millis();
char time[30];
unsigned long t=(stoptime-starttime)/1000;
int sec,min;
min=t/60;
sec=t%60;
sprintf(time,"%i min, %i sec",min,sec);
SERIAL_ECHO_START;
SERIAL_ECHOLN(time);
LCD_MESSAGE(time);
}
break;
```

Quick fix for me was to comment out the sprintf() call since I don't have a LCD anyway.

Applies to revision https://github.com/ErikZalm/Marlin/commit/5535e51bf678a367aa6e5d53068f5d20b1c15e0c